public Hasher Update(byte[] buf, int len) { if (len < 0 || len >= buf.Length) { throw new IndexOutOfRangeException(); } Bindings.rhash_update(ptr, buf, len); return(this); }
public Hasher UpdateFile(string filename) { Stream file = new FileStream(filename, FileMode.Open); byte[] buf = new byte[8192]; int len = file.Read(buf, 0, 8192); while (len > 0) { Bindings.rhash_update(ptr, buf, len); len = file.Read(buf, 0, 8192); } file.Close(); return(this); }
public Hasher Update(byte[] buf) { Bindings.rhash_update(ptr, buf, buf.Length); return(this); }