MetacoSA / NBitcoin

Comprehensive Bitcoin library for the .NET framework.
MIT License
1.87k stars 846 forks source link

Attempting to Decrypt Encrypted Bitcoin Secret Error #409

Closed 0x4Graham closed 6 years ago

0x4Graham commented 6 years ago

Hi,

I am attempting to decrypt encrypted bitcoin secret by using the password set when encrypting the project. When I call the:

var encryptedKey = ReadLine(); var secret = new BitcoinEncryptedSecretEC(encryptedKey, BitcoinNetwork);

The following error gets returned: System.FormatException: The version prefix does not match the expected one 1,67 at NBitcoin.Base58Data.SetString[T](String psz)

Not sure what I'm doing wrong?

NicolasDorier commented 6 years ago

use NBitcoin.BitcoinEncryptedSecret.Create("blahblag", Network.Main) instead

0x4Graham commented 6 years ago

Perfect, that worked! Thanks :-)