C# Class NContext.Security.Cryptography.CryptographyUtility

Mostra file Open project: PowerDMS/NContext Class Usage Examples

Public Methods

Method Description
CombineBytes ( Byte buffer1, Byte buffer2 ) : Byte[]

Combines two byte arrays into one.

CompareBytes ( Byte byte1, Byte byte2 ) : System.Boolean
GetBytes ( Byte bytes, Int32 count, Int32 offset ) : Byte[]
GetBytes ( Stream stream, Int32 count, Int32 offset ) : Byte[]
GetBytesFromHexString ( String hexadecimalNumber ) : Byte[]

Returns a byte array from a string representing a hexadecimal number.

GetHexStringFromBytes ( Byte bytes ) : String

Returns a string from a byte array represented as a hexadecimal number (eg: 0F351A).

Method Details

CombineBytes() public static method

Combines two byte arrays into one.

public static CombineBytes ( Byte buffer1, Byte buffer2 ) : Byte[]
buffer1 Byte The prefixed bytes.
buffer2 Byte The suffixed bytes.
return Byte[]

CompareBytes() public static method

public static CompareBytes ( Byte byte1, Byte byte2 ) : System.Boolean
byte1 Byte
byte2 Byte
return System.Boolean

GetBytes() public static method

public static GetBytes ( Byte bytes, Int32 count, Int32 offset ) : Byte[]
bytes Byte
count System.Int32
offset System.Int32
return Byte[]

GetBytes() public static method

public static GetBytes ( Stream stream, Int32 count, Int32 offset ) : Byte[]
stream Stream
count System.Int32
offset System.Int32
return Byte[]

GetBytesFromHexString() public static method

Returns a byte array from a string representing a hexadecimal number.

public static GetBytesFromHexString ( String hexadecimalNumber ) : Byte[]
hexadecimalNumber String /// The string containing a valid hexadecimal number. ///
return Byte[]

GetHexStringFromBytes() public static method

Returns a string from a byte array represented as a hexadecimal number (eg: 0F351A).

public static GetHexStringFromBytes ( Byte bytes ) : String
bytes Byte /// The byte array to convert to a hexadecimal number. ///
return String