Table of Contents

Class Hex

Namespace
Org.BouncyCastle.Utilities.Encoders
Assembly
BouncyCastle.Cryptography.dll

Class to decode and encode Hex.

public sealed class Hex
Inheritance
Hex
Inherited Members

Methods

Decode(byte[])

public static byte[] Decode(byte[] data)

Parameters

data byte[]

Returns

byte[]

Decode(string)

public static byte[] Decode(string data)

Parameters

data string

Returns

byte[]

Decode(string, Stream)

public static int Decode(string data, Stream outStream)

Parameters

data string
outStream Stream

Returns

int

DecodeStrict(string)

public static byte[] DecodeStrict(string str)

Parameters

str string

Returns

byte[]

DecodeStrict(string, int, int)

public static byte[] DecodeStrict(string str, int off, int len)

Parameters

str string
off int
len int

Returns

byte[]

Encode(byte[])

public static byte[] Encode(byte[] data)

Parameters

data byte[]

Returns

byte[]

Encode(byte[], Stream)

public static int Encode(byte[] data, Stream outStream)

Parameters

data byte[]
outStream Stream

Returns

int

Encode(byte[], int, int)

public static byte[] Encode(byte[] data, int off, int length)

Parameters

data byte[]
off int
length int

Returns

byte[]

Encode(byte[], int, int, Stream)

public static int Encode(byte[] data, int off, int length, Stream outStream)

Parameters

data byte[]
off int
length int
outStream Stream

Returns

int

ToHexString(byte[])

public static string ToHexString(byte[] data)

Parameters

data byte[]

Returns

string

ToHexString(byte[], bool)

public static string ToHexString(byte[] data, bool upperCase)

Parameters

data byte[]
upperCase bool

Returns

string

ToHexString(byte[], int, int)

public static string ToHexString(byte[] data, int off, int length)

Parameters

data byte[]
off int
length int

Returns

string

ToHexString(byte[], int, int, bool)

public static string ToHexString(byte[] data, int off, int length, bool upperCase)

Parameters

data byte[]
off int
length int
upperCase bool

Returns

string

ToHexString(ReadOnlyMemory<byte>, bool)

public static string ToHexString(ReadOnlyMemory<byte> data, bool upperCase = false)

Parameters

data ReadOnlyMemory<byte>
upperCase bool

Returns

string