Пример #1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="buffer"></param>
 /// <returns></returns>
 public static byte GetCrc8Bytes(byte[] buffer)
 {
     if (buffer == null)
     {
         throw new ArgumentNullException("buffer");
     }
     return(Crc8Hash.CRC(buffer));
 }
Пример #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="buffer"></param>
        /// <returns></returns>
        public static string GetCrc8String(byte[] buffer)
        {
            if (buffer == null)
            {
                throw new ArgumentNullException("buffer");
            }
            var b = Crc8Hash.CRC(buffer);

            return(BitConverter.ToString(new byte[] { b }));
        }