public static void Ripemd160(ReadOnlySpan <byte> data, Span <byte> hash) { var d = new Ripemd160Digest(); d.BlockUpdate(data); d.DoFinal(hash); }
public static byte[] Ripemd160(byte[] data, int offset, int count) { var d = new Ripemd160Digest(); d.BlockUpdate(data.AsSpan(offset, count)); var rv = new byte[20]; d.DoFinal(rv); return(rv); }
public static void Ripemd160(ReadOnlySequence <byte> data, Span <byte> hash) { var d = new Ripemd160Digest(); foreach (var m in data) { d.BlockUpdate(m.Span); } d.DoFinal(hash); }
private void CopyIn(Ripemd160Digest t) { base.CopyIn(t); _h0 = t._h0; _h1 = t._h1; _h2 = t._h2; _h3 = t._h3; _h4 = t._h4; Array.Copy(t._x, 0, _x, 0, t._x.Length); _xOff = t._xOff; }
/** * Copy constructor. This will copy the state of the provided * message digest. */ public Ripemd160Digest(Ripemd160Digest t) : base(t) { CopyIn(t); }