iOS网络 MD5以及各种加密

分类中封装好了 

MD5,

SHA1,

SHA256,

SHA512,

的加密分类...

一下演示MD5的加密,具体的可参照加密的头文件

先导入加密的头文件

//
//  ViewController.m
//  使用MD5
//
//  Created by chen on 15/2/16.
//  Copyright (c) 2015年 lanrw. All rights reserved.
//

#import "ViewController.h"
#import "NSString+Hash.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    NSString *md5Str = [@"abc" md5String];
    NSLog(@"%@",md5Str);
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end



http://pan.baidu.com/s/1sjqeT8x

你可能感兴趣的:(iOS网络 MD5以及各种加密)