Example #1
0
 public static uint Crc32(byte[] buffer)
 {
     if (buffer == null)
     {
         throw new ArgumentNullException("buffer");
     }
     return(Crc.Crc32(buffer, 0, buffer.Length));
 }
Example #2
0
 public static uint Crc32(string str)
 {
     return(Crc.Crc32(str, "utf-8"));
 }
Example #3
0
 public static uint Crc32(string str, string encoding)
 {
     byte[] bytes = Encoding.GetEncoding(encoding).GetBytes(str);
     return(Crc.Crc32(bytes));
 }