/// <summary> /// Decode the Base16-encoded string /// </summary> /// <param name="input">Base16-encoded string</param> /// <returns>Decoded bytes</returns> public byte[] Decode(string input) { if (input == null) { throw new ArgumentNullException(nameof(input)); } var impl = new Internal.Base16(BufferSize); return(impl.Decode(input)); }
/// <summary> /// Encode bytes to a Base16-encoded string /// </summary> /// <param name="input">Bytes to encode</param> /// <param name="output">Base16-encoded string</param> public Task EncodeStreamAsync(Stream input, Stream output) { if (input == null) { throw new ArgumentNullException(nameof(input)); } if (output == null) { throw new ArgumentNullException(nameof(output)); } var impl = new Internal.Base16(BufferSize); return(impl.EncodeAsync(input, output)); }