Пример #1
0
        public void TestRIPEMD160()
        {
            MsftHasher   hasher       = new MsftHasher();
            string       input        = "t6MJu}q<&4Krk,9<";
            const string expectedHash = "2664bb6bac1c8f6197e08fbea6f05e5b49bbcf42";
            var          hash         = hasher.RIPEMD160(input.HashOfText());

            expectedHash.Should().BeEquivalentTo(hash.ToHexString());
        }
Пример #2
0
        /// <summary>
        /// Peforms a RIPEMD160 hash on the hash
        /// </summary>
        /// <param name="hash">input hash</param>
        /// <returns>RIPEMD160 hash of the hash</returns>
        public static Hash160 RIPEMD160(this Hash256 hash)
        {
            MsftHasher hasher = new MsftHasher();

            return(hasher.RIPEMD160(hash));
        }