Re: Adding password for a file to keychain
Re: Adding password for a file to keychain
- Subject: Re: Adding password for a file to keychain
- From: Glen Simmons <email@hidden>
- Date: Tue, 20 Dec 2005 11:55:57 -0600
On Dec 20, 2005, at 11:31 AM, Shawn Erickson wrote:
On 12/20/05, Glen Simmons <email@hidden> wrote:
On Dec 20, 2005, at 10:52 AM, Shawn Erickson wrote:
On 12/20/05, Glen Simmons <email@hidden> wrote:
On Dec 20, 2005, at 12:50 AM, j o a r wrote:
On 19 dec 2005, at 23.05, Glen Simmons wrote:
I wish I could. This is a cross-platform app and I can't change
the file format.
How is this problem solved on those other platforms? Perhaps
not at
all?
Would it perhaps be possible to add this data in a way that
doesn't
affect the ability to read this file on other platforms? How about
adding it to the resource fork (I know, not very Mac OS X...) as a
last resort?
They match by path. :(
Are the passwords you store for files that will be modified or just
read? If just read then you could use something like an MD5 hash of
the file to get you a signature of the file that then could be
used as
the key to store and lookup the password in the keychain.
Modified as well. Good idea, but ...
Of course using an alias should work as well (if you get the right
form and resolve it correctly... unless somehow the file is being
replaced when modified).
The alias works unless the file has been moved or renamed.
How was it moved or renamed?
Aliases, when use right, will deal with moves and renamed as long as
the file is still on the same volume.
So how are you constructing your alias and resolving your alias?
Constructed with FSNewAliasMinimal. The problem is that I don't have
the alias that was constructed the first time, that one is in the
keychain. I'm having to ask the keychain for a password based on an
alias created right now. If the filename or path has changed since
the password was first added to the keychain, the data from the two
aliases will be different even though they resolve to the same file.
That's why I was going to go through the keychain items and see if
alias resolves to the file I'm trying to open.
Glen
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden