public IEnumerable <PrivateKey> ListMyAddresses() { lock (_lock4privateKeysCache) { if (_privateKeysCache == null) { _privateKeysCache = new List <PrivateKey>(PrivateKey.GetAll(DB)); } return(_privateKeysCache.ToList()); } }
internal PrivateKey FindPrivateKey(GetPubkey getpubkey) { lock (_lock4privateKeysCache) { if (_privateKeysCache == null) { _privateKeysCache = new List <PrivateKey>(PrivateKey.GetAll(DB)); } return(_privateKeysCache.FirstOrDefault(key => ((key.Hash4DB == getpubkey.Hash4DB) && (key.Version4DB == getpubkey.Version4DB) && (key.Stream4DB == getpubkey.Stream4DB) ))); } }