Skip to content

qunwang6/AES128

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AES128

#import "NSData+AES.h"
#import "Base64.h"

NSData *cipherData;
NSString *base64Text, *plainText;
NSString *key    = @"";
//############## Request(crypt) ##############
plainText  = @"123456789";
cipherData = [[plainText dataUsingEncoding:NSUTF8StringEncoding] AES128EncryptedDataWithKey:key];
base64Text = [cipherData base64Encoding];
NSLog(@"%@", base64Text);

base64Text = @"uvNcRgwpu6KL1yRMdO686Q==";
cipherData = [base64Text base64DecodedData];
plainText  = [[NSString alloc] initWithData:[cipherData AES128DecryptedDataWithKey:key] encoding:NSUTF8StringEncoding];
NSLog(@"%@", plainText);

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published