private SecRecord GetRecord(string key, out SecStatusCode ssc) { // create an instance of the record to query var sr = new SecRecord(SecKind.GenericPassword); sr.Account = key; return SecKeyChain.QueryAsRecord(sr, out ssc); }