A little knowledge of MD5 encryption

Source: Internet
Author: User

-(NSString *) Md5hash

{

const char *CSTR = [self utf8string];

unsigned char result[16];

CC_MD5 (CSTR, (unsigned int)strlen (CSTR), result);

return [NSString stringWithFormat:

@ "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",

Result[0], result[1], result[2], result[3],

RESULT[4], result[5], result[6], result[7],

RESULT[8], result[9], result[10], result[11],

RESULT[12], result[13], result[14], result[15]];

}

Here the blue text on MD5 third party is not set data type, but you click Open strlen (CSTR) will find size_t. Open the size_t again.

Show:

#ifndef _size_t

#define _size_t

typedef __darwin_size_t SIZE_T;

#endif/* _size_t */

You found out that size_t was in

typedef under the __darwin_size_t, and then open.

to the Lord.

typedef __size_type__ __darwin_size_t; /* sizeof () */

It turns out to be the sizeof () type

And what type of sizeof () is, of course,

It's unsigned int type.

A little knowledge of MD5 encryption

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.