Re: SScrypto framework
Re: SScrypto framework
- Subject: Re: SScrypto framework
- From: Jens Alfke <email@hidden>
- Date: Wed, 13 Feb 2008 08:08:12 -0800
On 13 Feb '08, at 7:31 AM, Davide Scheriani wrote:
NSString *password = [[tocrypt textStorage] string];
[crypto setClearTextWithString:password];
NSData *cipherText = [crypto encrypt:@"blowfish"];
[cipherText writeToFile:@"/Users/XYZ/Desktop/key.andrk"
atomically:YES];
NSLog(@"Now encrypted: %s",[cipherText bytes]);
I don't see where you're setting a key for the encryption/decryption.
Every crypto algorithm needs you to supply a key. (Which of course you
need to store somewhere safe.)
Maybe there's a better way to do what you want. Looks like you're
trying to store a user's password safely — the best way to do this is
by using the Keychain, which is (among other things) a secure
encrypted password store.
—Jens_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden