/// <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)); }
/// <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 })); }