NSData to NSString by changing the value null is returned. I need you help
Posted
by kevin
on Stack Overflow
See other posts from Stack Overflow
or by kevin
Published on 2010-04-01T00:54:05Z
Indexed on
2010/04/01
1:13 UTC
Read the original article
Hit count: 409
*cipher.h, cipher.m all code : http://watchitlater.com/blog/2010/02/java-and-iphone-aes-interoperability
Cipher.m
-(NSData *)encrypt:(NSData *)plainText{
return [self transform:KCCEncrypt data:plainText;
}
step1.
Cipher *cipher = [[Cipher alloc]initWithKey:@"1234567890"];
NSData *input = [@"kevin" dataUsingEncoding:NSUTF8StringEncoding];
NSData *data = [cipher encrypt:input];
data variables NSLog print : <4d1c4d7f 1592718c fd588cec 84053e35>
step2.
NSString *changeVal = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
data variables NSLog print : null
NSData to NSString by changing the value null is returned. By converting NSString NSURLConnection want to transfer. I need you help
© Stack Overflow or respective owner