Skip to content

Instantly share code, notes, and snippets.

@torinkwok
Created March 2, 2015 01:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save torinkwok/86785f784f60b5cd0936 to your computer and use it in GitHub Desktop.
Save torinkwok/86785f784f60b5cd0936 to your computer and use it in GitHub Desktop.
Batch Search with WaxSealCore
// Find all the Internet passphrases that met the given search criteria
NSArray* passphrases = [ [ WSCKeychain login ]
// Batch search
findAllKeychainItemsSatisfyingSearchCriteria: @{ WSCKeychainItemAttributeLabel : @"secure.imdb.com"
, WSCKeychainItemAttributeProtocol : WSCInternetProtocolCocoaValue( WSCInternetProtocolTypeHTTPS )
, WSCKeychainItemAttributeComment : @"👿👿👿👿👿👿"
}
itemClass: WSCKeychainItemClassInternetPassphraseItem
error: &error ];
if ( passphrases.count != 0 )
{
for ( WSCPassphraseItem* _Passphrase in passphrases )
{
NSLog( @"==============================" );
NSLog( @"IMDb User Name: %@", IMDbLoginPassphrase.account );
NSLog( @"Passphrase: %@", [ [ [ NSString alloc ] initWithData: IMDbLoginPassphrase.passphrase encoding: NSUTF8StringEncoding ] autorelease ] );
NSLog( @"Comment: %@", IMDbLoginPassphrase.comment );
NSLog( @"==============================" );
_Passphrase.comment = @"👺👹👺👹";
}
}
else
NSLog( @"I'm so sorry!" );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment