Re: Fast KeyChain Functions...
Re: Fast KeyChain Functions...
- Subject: Re: Fast KeyChain Functions...
- From: David Crowe <email@hidden>
- Date: Wed, 25 May 2005 08:45:42 -0600
Kai;
Let's say that I want to get the password for a key with the name
"PayPal Account". Since I can't use AppleScript to directly ask
KeyChain Scripting for the key by name, I have to do a scan through
the list by key number. Since the list is not ordered in any obvious
fashion, no optimizations such as a binary search are possible.
Consequently, a linear scan is necessary, and that takes many seconds
just to find one key. So, although the scripting is very simple, it's
also unacceptably slow.
By building an index on disk it's possible to identify the key number
quite quickly, and then access the key by number.
The complexity comes because when a key is added to or removed from
the keychain, the index is out of synch, and then a limited amount of
scanning is required to repair the index. Scanning can be limited in
this case because key indexes don't move increase or decrease than
the number of keys that have been added or removed
- David Crowe
At 8:11 AM +0100 5/25/05, kai wrote:
On Wednesday, May 25, 2005, at 03:46 am, David Crowe wrote:
Yes, this works, now try using it to figure out which of several
hundred keys you want ... you'll be waiting quite a long time.
- David
At 11:40 PM +0100 5/24/05, kai wrote:
On Tuesday, May 24, 2005, at 09:47 pm, David Crowe wrote:
The inability of the KeyChain to process commands like "key whose
name is..." makes access unbearably slow.
Doesn't something like this work for you, David?
----------------
tell application "Keychain Scripting" to first key of ¬
keychain "keychainName" whose name is "keyName"
----------------
Sorry David, clearly I misunderstood your opening sentence - and
can't quite grasp the nature of the problem. :-)
---
kai
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden