public static Encode ( byte bytes ) : string | ||
bytes | byte | /// An array of 8-bit unsigned integers. /// |
Результат | string |
public void Java() { String input = "QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB"; byte[] output = Base58.Decode(input); String encoded = Base58.Encode(output); Assert.AreEqual(input, encoded); }
public void Zero() { Assert.AreEqual("1111111", Base58.Encode(new byte[7])); Assert.AreEqual(7, Base58.Decode("1111111").Length); Assert.IsTrue(Base58.Decode("1111111").All(b => b == 0)); }
public void Encode() { Assert.AreEqual("jo91waLQA1NNeBmZKUF", Base58.Encode(Encoding.UTF8.GetBytes("this is a test"))); Assert.AreEqual("jo91waLQA1NNeBmZKUF", Encoding.UTF8.GetBytes("this is a test").ToBase58()); }
public override string ToString() { return(Base58.Encode(Value)); }