Exemple #1
0
        private void ProcessOldSecretFile(byte[] aOldSecretFile, out string aPasscode, out Dictionary <string, string[]> aExchangeKeys, out string aUserPassword)
        {
            var lOldSecretReader = new OldSecretReader(aOldSecretFile);
            var lValidation      = new PasswordValidationDelegate((aPassword) => lOldSecretReader.DecryptWalletKey(aPassword));

            aUserPassword = OnOldWalletPasswordNeeded.Invoke(lValidation);
            aExchangeKeys = new Dictionary <string, string[]>();
            aPasscode     = lOldSecretReader.PasscodeEntropy.ToString("N");
            foreach (var lExchangeKey in lOldSecretReader.FExchangeKeys)
            {
                aExchangeKeys.Add(lExchangeKey.ExchangeName, new string[2] {
                    lExchangeKey.Key, lExchangeKey.Secret
                });
            }
        }
Exemple #2
0
 private string PromptUserForPassword(PasswordValidationDelegate aVerificationDelegate)
 {
     return(PasswordDialogCallMethod?.Invoke(aVerificationDelegate));
 }