public bool CheckAdler32() { if (AdlerChecksum.Generate(ref buffer, 6, length) != GetAdler32()) { return(false); } return(true); }
/// Equals determines whether two files (buffers) /// have the same checksum value (identical). /// </summary> /// <param name="obj">A AdlerChecksum object for comparison</param> /// <returns>Returns true if the value of checksum is the same /// as this instance; otherwise, false /// </returns> public override bool Equals(object obj) { if (obj == null || this.GetType() != obj.GetType()) { return(false); } AdlerChecksum other = (AdlerChecksum)obj; return(this.ChecksumValue == other.ChecksumValue); }
public void AddAdler32() { Array.Copy(BitConverter.GetBytes(AdlerChecksum.Generate(ref buffer, 6, length)), 0, buffer, 2, 4); }