public void TestDecode()
{
var testbytes = Encoding.UTF8.GetBytes("Hello World");
var actualbytes = Base58.Decode("JxF12TrwUP45BMd");
Assert.IsTrue(testbytes.SequenceEqual(actualbytes), Encoding.UTF8.GetString(actualbytes, 0, actualbytes.Length));
try
{
Base58.Decode("This isn't valid base58");
Assert.Fail();
}
catch (AddressFormatException)
{
}
Base58.DecodeChecked("4stwEBjT6FYyVV");
// Now check we can correctly decode the case where the high bit of the first byte is not zero, so BigInteger
// sign extends. Fix for a bug that stopped us parsing keys exported using Sipa's patch.
Base58.DecodeChecked("93VYUMzRG9DdbRP72uQXjaWibbQwygnvaCu9DumcqDjGybD864T");
}