namespace NovacoinTest
{
using Novacoin;
+ using System.Collections.Generic;
class Program
{
Console.WriteLine("Hard-Coded privkey address: {0}", keyPair4.GetKeyID().ToString());
Console.WriteLine("Hard-Coded privkey: {0}\n", keyPair4.ToString());
+ // Privkey hex deserialization test
+ CKeyPair keyPair5 = new CKeyPair(keyPair4.Secret.ToArray());
+ Console.WriteLine("Decoded privkey in Hex: {0}", keyPair5.ToHex());
+ Console.WriteLine("Decoded privkey address: {0}\n", keyPair5.GetKeyID().ToString());
/// ECDSA keypair signing test
CNovacoinAddress donationAddress = new CNovacoinAddress(strDonationAddress);
Console.WriteLine("Address reserialization is OK: {0}", donationAddress.ToString() == pubKeyTest.GetKeyID().ToString());
+ /// Block header hashing test
+ IEnumerable<byte> dataBytesForScrypt = b1.header.ToBytes();
+ ScryptHash256 scryptHash = ScryptHash256.Compute256(dataBytesForScrypt);
+
+ Console.WriteLine("block1 header hash: {0}", scryptHash.ToString());
+
Console.ReadLine();
}
}