You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: