Example #1
0
        private string DecryptEncryptedKey(BitcoinSecret mainSecret)
        {
            string key = string.Empty;

            if (!string.IsNullOrEmpty(ESKey))
            {
                key = SymetricProvider.DecryptString(SecurityUtils.ComputeSha256Hash(mainSecret.PrivateKey.ToString()), ESKey);
            }
            else if (!string.IsNullOrEmpty(EKey))
            {
                key = ECDSAProvider.DecryptStringWithPrivateKey(EKey, mainSecret.PrivateKey); // TODO: some preprocessor directive for run just in old version under .NETStandard2.1
            }
            return(key);
        }