Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decryption result getting null in IOS #49

Open
arpitjoshi08 opened this issue Jan 11, 2017 · 0 comments
Open

Decryption result getting null in IOS #49

arpitjoshi08 opened this issue Jan 11, 2017 · 0 comments

Comments

@arpitjoshi08
Copy link

arpitjoshi08 commented Jan 11, 2017

i am using this code for encrypt and decryption
NSString * _secret = @"Ashish";           NSString * _key = @"1234";          NSData * encryptedData = [[StringEncryption alloc] encrypt:[_secret dataUsingEncoding:NSUTF8StringEncoding] key:_key iv:@"WLCOU32wBQnUDdw="];           NSLog(@"encrypted data:: %@", [encryptedData  base64EncodingWithLineLength:0]); //print the encrypted text           encryptedData = [[StringEncryption alloc] decrypt:encryptedData  key:_key iv:@"WLCOU32wBQnUDdw="];          NSString * decryptedText = [[NSString alloc] initWithData:encryptedData encoding:NSUTF8StringEncoding];      NSLog(@"decrypted data:: %@", decryptedText); //print the decrypted text
encryption result getting properly but decryption result getting null.How can we resolved that?
i am just checking with hard code data in both android and ios but its working properly in android.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant