#import <CommonCrypto/CommonDigest.h>

- (NSString *)md5:(NSString *)str

{

const char *cStr = [str UTF8String];

unsigned char result[16];

CC_MD5(cStr, (CC_LONG)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]

];

}

最新文章

  1. MVC 解决 readonly 问题
  2. float和double在内存中的存储方式
  3. Android 模拟器genymotion安装,eclipse 插件
  4. 这是BUG吗?
  5. autoLyout纯代码适配
  6. 程序员书单_J2EE专题
  7. 推荐一个代码生成工具:freemarker
  8. HDU 4596 Yet another end of the world (数学,扩展欧几里德)
  9. UVa 120 (构造) Stacks of Flapjacks
  10. mina2.0 spring
  11. remove all event handlers from a control
  12. c语言实现tree数据结构
  13. C++ 头文件系列(vector)
  14. 关于Excel数据批量导入数据库的案例
  15. include、include_once、require、require_once其区别
  16. MySQL常用命令汇总(偏向运维管理)
  17. Python面向对象之魔术方法
  18. 在 CentOS7 安装 ELK
  19. httpd基于域名虚拟主机配置
  20. ubuntu开启远程shell,开启上传下载

热门文章

  1. 文本格式ANSI,Unicode等有什么区别
  2. Hadoop: LongWritable cannot be cast to org.apache.hadoop.io.IntWritable
  3. CodeForces 696A Lorenzo Von Matterhorn (LCA + map)
  4. Lightoj 1004 - Monkey Banana Problem
  5. 转:loadruner报错:Step download timeout(120 seconds)的一个解决方法
  6. Day05_JAVAEE系列:XML
  7. 转载 C++学习第9篇---类和类的封装
  8. CentOS 6.5搭建Samba服务器
  9. (转)Hadoop之常见错误集锦
  10. FZU Problem 2213 Common Tangents