private static KeccakStructRef InternalCompute(Span <byte> input) { var result = new KeccakStructRef(); KeccakHash.ComputeHashBytesToSpan(input, result.Bytes); return(result); }
public static KeccakStructRef Compute(string input) { if (string.IsNullOrWhiteSpace(input)) { return(new KeccakStructRef(Keccak.OfAnEmptyString.Bytes)); } var result = new KeccakStructRef(); KeccakHash.ComputeHashBytesToSpan(System.Text.Encoding.UTF8.GetBytes(input), result.Bytes); return(result); }
public static KeccakStructRef Compute(Span <byte> input) { if (input.Length == 0) { return(new KeccakStructRef(Keccak.OfAnEmptyString.Bytes)); } var result = new KeccakStructRef(); KeccakHash.ComputeHashBytesToSpan(input, result.Bytes); return(result); }