Rdi

Log.i("sig params", "result:" + result); return result; )

hanwK ^Mmimxjmm^ mfnfa&mxmmik, API ^.z^mm mn&li -^fcMD5

public static Str_ng md5(String s) throws NoSuchAlgorithmException ( System.out.print In(System.currentTimeMillis()); MessageOigest m MessageDigest.getInstance("MD5"); m.update(s.getBytes(), 0, s.length());

String ir.db str - new Big] nteger (1, m. digest ()). toSt ring (16) ; Log. i ("MD5", md5 str); return md5 str; )

XiWWft:

fi'Jil! ^h MessageDigest, iW«rii MD5 tfj.'Ho j£fllfi^ASfi(Kltimestamp|n nonce, tt^S^TrPK:

lonq timestamp = System.currentTimeKi1lis{); String nonce = YOBOUtii.md5(String.valueOf(System .currentTimeMillis0 ) +PreferencesUtil.api_secret);

Hashtable<String, String> params = new Hashtable<String, String>(); params.put("api key", PreferencesUti1.api key); params.put("nonce", nonce) ;

params.put("timestamp", String.valueOf(timestamp)); \ ft«**:

SMWHfM« (timestamp) njWiRAiilfeiffiili^ffl System.currentTimeMillis()«l&, tftj nonce ii ^^^«fiWBfi^lit. affiafiffifflBtM«j|P±.i|dtt API m:m (api_secret), MJfi&M MD5 tfiffi K.

0 0

Post a comment