Closed marian-gheorghe closed 5 years ago
Simple C# code to reproduce the issue
class Program { public static byte[] Sha256(byte[] data) { var sha256 = SHA256.Create(); return sha256.ComputeHash(data); } static void Main(string[] args) { byte[] bytes = { 0, 0, 0, 0, 0, 0, 20, 131, 0, 0, 1, 61, 2 }; var hashBytes = Sha256(bytes); var encoded = Base58.Bitcoin.Encode(hashBytes); var decoded = Base58.Bitcoin.Decode(encoded); if (hashBytes.Length != decoded.Length) Console.WriteLine("Failed : Expected {0} computed {1}", hashBytes.Length, decoded.Length); } }
I fixed this in 818175a5fa5fbdb9b19d472d983f02d1ad3ac268 which was included in 1.8.0 release. Thanks!
Simple C# code to reproduce the issue