Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SScrypto framework




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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >SScrypto framework (From: Davide Scheriani <email@hidden>)
 >Re: SScrypto framework (From: "I. Savant" <email@hidden>)
 >Re: SScrypto framework (From: Davide Scheriani <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.