That's a good answer for a server app, that needs to authenticate
users. But I was assuming this code was part of a client app, doing
something like saving the user's login password to avoid asking for
it every time. In which case the Keychain is the right solution.
Indeed, if I had to actually remember all seventy or so passwords in
my keychain, I'd end up writing them down on paper. What's the
security of the Keychain vs a sticky note? :)