diff -r b2e360b78189 -r 058394513f33 MYKeychain-iPhone.m --- a/MYKeychain-iPhone.m Thu Apr 09 22:27:51 2009 -0700 +++ b/MYKeychain-iPhone.m Sat Jun 06 15:36:35 2009 -0700 @@ -106,6 +106,13 @@ return [[[MYKeyEnumerator alloc] initWithQuery: query] autorelease]; } +- (MYIdentity*) identityWithDigest: (MYSHA1Digest*)pubKeyDigest { + return [MYKeyEnumerator firstItemWithQuery: + $mdict({(id)kSecClass, (id)kSecClassIdentity}, + {(id)kSecAttrPublicKeyHash, pubKeyDigest.asData}, + {(id)kSecReturnRef, $true})]; +} + - (NSEnumerator*) enumerateIdentities { NSMutableDictionary *query = $mdict({(id)kSecClass, (id)kSecClassIdentity}, {(id)kSecMatchLimit, (id)kSecMatchLimitAll},