0
我有一個NSData的值,我通過使用以下代碼我如何使用MD5散列字節數組中的值?
Byte *byteData = (Byte*)malloc(24); //byte array
int len=[result length]; //find the length
memcpy(byteData, [result bytes], len); // copy the bytes values of "result" to bytes array
NSString *MD5Key=[[NSString alloc]initWithFormat:@"%@",[result md5]]; // find md5 values
NSLog(@"%@",MD5Key);
NSString *finalKey=[MD5Key substringToIndex:8];
發現值的字節,但我需要字節陣列(byteData)的MD5值?我怎樣才能做到這一點 ?