public void Digest(ReadOnlySpan <byte> data, Span <byte> result, params object[] extra) { Contract.Requires <ArgumentException>(result.Length >= 32, $"{nameof(result)} must be greater or equal 32 bytes"); fixed(byte *input = data) { fixed(byte *output = result) { LibMultihash.qubit(input, output, (uint)data.Length); } } }
public byte[] Digest(byte[] data, params object[] extra) { Contract.RequiresNonNull(data, nameof(data)); var result = new byte[32]; fixed(byte *input = data) { fixed(byte *output = result) { LibMultihash.qubit(input, output, (uint)data.Length); } } return(result); }