示例#1
0
        public void Sign()
        {
            TestVerifiable verifiable = new TestVerifiable();

            byte[] res = verifiable.Sign(new KeyPair(TestUtils.GetByteArray(32, 0x42)));
            res.Length.Should().Be(64);
        }
示例#2
0
        public void GetHashData()
        {
            TestVerifiable verifiable = new TestVerifiable();

            byte[] res = verifiable.GetHashData();
            res.ToHexString().Should().Be("4e454f000774657374537472");
        }
示例#3
0
        public void Sign()
        {
            TestVerifiable verifiable = new TestVerifiable();

            byte[] res = verifiable.Sign(new KeyPair(TestUtils.GetByteArray(32, 0x42)), ProtocolSettings.Default.Magic);
            res.Length.Should().Be(64);
        }
示例#4
0
        public void GetSignData()
        {
            TestVerifiable verifiable = new TestVerifiable();

            byte[] res = verifiable.GetSignData(ProtocolSettings.Default.Magic);
            res.ToHexString().Should().Be("4e454f0050b51da6bb366be3ea50140cda45ba7df575287c0371000b2037ed3898ff8bf5");
        }
示例#5
0
        public void GetHashData()
        {
            TestVerifiable verifiable = new TestVerifiable();

            byte[] res = verifiable.GetHashData();
            res.Length.Should().Be(8);
            byte[] requiredData = new byte[] { 7, 116, 101, 115, 116, 83, 116, 114 };
            for (int i = 0; i < requiredData.Length; i++)
            {
                res[i].Should().Be(requiredData[i]);
            }
        }