Exemplo n.º 1
0
 /// <summary>
 /// Calculates the CRC32 polynomial of an object.
 /// </summary>
 /// <param name="value">The object to check.</param>
 /// <returns>A checksum of <paramref name="value"/> as an integer.</returns>
 public static long CRC32(object value)
 {
     var raw = ToByteArray(value);
     var alg = new Common.CRC32();
     alg.ComputeHash(raw);
     return alg.Value;
 }
Exemplo n.º 2
0
        /// <summary>
        /// Calculates the CRC32 polynomial of an object.
        /// </summary>
        /// <param name="value">The object to check.</param>
        /// <returns>A checksum of <paramref name="value"/> as an integer.</returns>
        public static long CRC32(object value)
        {
            var raw = ToByteArray(value);
            var alg = new Common.CRC32();

            alg.ComputeHash(raw);
            return(alg.Value);
        }