コード例 #1
0
ファイル: NEP6Wallet.cs プロジェクト: dorucioclea/neo
 public override bool VerifyPassword(string password)
 {
     lock (accounts)
     {
         NEP6Account account = accounts.Values.FirstOrDefault(p => !p.Decrypted);
         if (account == null)
         {
             account = accounts.Values.FirstOrDefault(p => p.HasKey);
         }
         if (account == null)
         {
             return(true);
         }
         if (account.Decrypted)
         {
             return(account.VerifyPassword(password));
         }
         else
         {
             try
             {
                 account.GetKey(password);
                 return(true);
             }
             catch (FormatException)
             {
                 return(false);
             }
         }
     }
 }
コード例 #2
0
ファイル: NEP6Wallet.cs プロジェクト: txhsl/neo
 public override bool VerifyPassword(string password)
 {
     lock (accounts)
     {
         NEP6Account account = accounts.Values.FirstOrDefault(p => !p.Decrypted);
         if (account == null)
         {
             account = accounts.Values.FirstOrDefault(p => p.HasKey);
         }
         if (account == null)
         {
             return(true);
         }
         return(account.VerifyPassword(password));
     }
 }