<PackageReference Include="BouncyCastle.Cryptography" Version="2.6.1" />

Org.BouncyCastle.Utilities.Encoders.HexEncoder

public class HexEncoder : IEncoder
namespace Org.BouncyCastle.Utilities.Encoders { public class HexEncoder : IEncoder { protected readonly byte[] encodingTable; protected readonly byte[] decodingTable; protected void InitialiseDecodingTable(); public HexEncoder(); public int Encode(byte[] inBuf, int inOff, int inLen, byte[] outBuf, int outOff); public int Encode(byte[] buf, int off, int len, Stream outStream); public int Decode(byte[] data, int off, int length, Stream outStream); public int DecodeString(string data, Stream outStream); } }