示例#1
0
        public void ComputeHash3()
        {
            RIPEMD160Hash target    = new RIPEMD160Hash();
            var           input     = ASCIIEncoding.ASCII.GetBytes("message digest");
            var           expeceted = new byte[] { 0x5d, 0x06, 0x89, 0xef, 0x49, 0xd2, 0xfa, 0xe5, 0x72, 0xb8, 0x81, 0xb1, 0x23, 0xa8, 0x5f, 0xfa, 0x21, 0x59, 0x5f, 0x36 };
            var           output    = target.ComputeHash(input);

            Assert.IsTrue(output.SequenceEqual(expeceted));
        }
示例#2
0
        public void ComputeHash1()
        {
            RIPEMD160Hash target    = new RIPEMD160Hash();
            var           input     = ASCIIEncoding.ASCII.GetBytes("a");
            var           expeceted = new byte[] { 0x0b, 0xdc, 0x9d, 0x2d, 0x25, 0x6b, 0x3e, 0xe9, 0xda, 0xae, 0x34, 0x7b, 0xe6, 0xf4, 0xdc, 0x83, 0x5a, 0x46, 0x7f, 0xfe };
            var           output    = target.ComputeHash(input);

            Assert.IsTrue(output.SequenceEqual(expeceted));
        }
示例#3
0
        public void ComputeHash2()
        {
            RIPEMD160Hash target    = new RIPEMD160Hash();
            var           input     = ASCIIEncoding.ASCII.GetBytes("abc");
            var           expeceted = new byte[] { 0x8e, 0xb2, 0x08, 0xf7, 0xe0, 0x5d, 0x98, 0x7a, 0x9b, 0x04, 0x4a, 0x8e, 0x98, 0xc6, 0xb0, 0x87, 0xf1, 0x5a, 0x0b, 0xfc };
            var           output    = target.ComputeHash(input);

            Assert.IsTrue(output.SequenceEqual(expeceted));
        }