Beispiel #1
0
        public void ComputeCRC32HashByteTest()
        {
            string input, expected;

            byte[] actual = null;

            input    = "2520056747225332399_63a5c229-2461-4e7c-805d-82394a99bd11";
            expected = "eff6144a";

            actual = CryptographyHelper.ComputeCRC32HashByte(input);
            Assert.IsNotNull(actual);
            Assert.AreEqual(expected, CryptographyHelper.ByteToHex(actual));
        }
Beispiel #2
0
        private static int ComputeHashCode(string value)
        {
            Guard.ArgumentNotNullOrWhiteSpace(value, "value");

            return(BitConverter.ToInt32(CryptographyHelper.ComputeCRC32HashByte(value), 0));
        }