示例#1
0
        public void ComputeHash_AMillionATest()
        {
            using Sha512 sha = new Sha512();
            byte[] actualHash   = sha.ComputeHash(HashTestCaseHelper.GetAMillionA());
            byte[] expectedHash = Helper.HexToBytes("e718483d0ce769644e2e42c7bc15b4638e1f98b13b2044285632a803afa973ebde0ff244877ea60a4cb0432ce577c31beb009c5c2c49aa2e4eadb217ad8cc09b");

            Assert.Equal(expectedHash, actualHash);
        }
示例#2
0
        public void ComputeHash_AMillionATest()
        {
            using Ripemd160 rip = new Ripemd160();
            byte[] actualHash   = rip.ComputeHash(HashTestCaseHelper.GetAMillionA());
            byte[] expectedHash = Helper.HexToBytes("52783243c1697bdbe16d37f97f68f08325dc1528");

            Assert.Equal(expectedHash, actualHash);
        }
示例#3
0
        public void ComputeHash_AMillionATest()
        {
            using Sha256 sha = new Sha256();
            byte[] actualHash   = sha.ComputeHash(HashTestCaseHelper.GetAMillionA());
            byte[] expectedHash = Helper.HexToBytes("cdc76e5c9914fb9281a1c7e284d73e67f1809a48a497200e046d39ccc7112cd0");

            Assert.Equal(expectedHash, actualHash);
        }