public void TestSharedKey() { var crypto = new WavesCrypto(); var a = new KeyPair("1f98af466da54014bdc08bfbaaaf3c67"); var b = new KeyPair("1f98af466da54014bdc08bfbaaaf3c671f98af466da54014bdc08bfbaaaf3c67"); var sharedKey1 = crypto.SharedKey(crypto.Base58Decode(a.PrivateKey), crypto.Base58Decode(b.PublicKey), "waves"); var sharedKey2 = crypto.SharedKey(crypto.Base58Decode(b.PrivateKey), crypto.Base58Decode(a.PublicKey), "waves"); CollectionAssert.AreEqual(sharedKey1, sharedKey2); }
public void Base58EncodeDecodeTest() { var address = "3N1JMgUfzYUZinPrzPWeRa6yqN67oo57XR7"; var crypto = new WavesCrypto(); Assert.AreEqual(address, crypto.Base58Encode(crypto.Base58Decode(address))); }