C# Класс Iaik.Utils.ByteHelper

Static class which provides some byte helper functions
Показать файл Открыть проект

Открытые методы

Метод Описание
ByteArrayToHexString ( byte data ) : string

Converts a byte array to a space seperated hex string

ByteArrayToHexString ( byte data, string seperator ) : string

Converts a byte array to a hex string

ByteArrayToUInt64 ( byte data, int offset, int length ) : System.UInt64

Decodes the number encoded in data as a little endian number

ByteArrayToUInt64 ( byte data, int offset, int length, bool useLittleEndian ) : System.UInt64
ClearBytes ( byte data ) : void
CompareByteArrays ( byte left, byte right ) : bool

Compares the 2 byte arrays and returns if they contain the same data

SerializeToBytes ( ) : byte[]
XORBytes ( byte data, byte key ) : void

XORs all bytes from data with key and saves them to data

Описание методов

ByteArrayToHexString() публичный статический Метод

Converts a byte array to a space seperated hex string
public static ByteArrayToHexString ( byte data ) : string
data byte
Результат string

ByteArrayToHexString() публичный статический Метод

Converts a byte array to a hex string
public static ByteArrayToHexString ( byte data, string seperator ) : string
data byte
seperator string seperator which is appended to each hex value (except the last)
Результат string

ByteArrayToUInt64() публичный статический Метод

Decodes the number encoded in data as a little endian number
public static ByteArrayToUInt64 ( byte data, int offset, int length ) : System.UInt64
data byte A
offset int A
length int A
Результат System.UInt64

ByteArrayToUInt64() публичный статический Метод

public static ByteArrayToUInt64 ( byte data, int offset, int length, bool useLittleEndian ) : System.UInt64
data byte
offset int
length int
useLittleEndian bool
Результат System.UInt64

ClearBytes() публичный статический Метод

public static ClearBytes ( byte data ) : void
data byte
Результат void

CompareByteArrays() публичный статический Метод

Compares the 2 byte arrays and returns if they contain the same data
public static CompareByteArrays ( byte left, byte right ) : bool
left byte
right byte
Результат bool

SerializeToBytes() публичный статический Метод

public static SerializeToBytes ( ) : byte[]
Результат byte[]

XORBytes() публичный статический Метод

XORs all bytes from data with key and saves them to data
public static XORBytes ( byte data, byte key ) : void
data byte
key byte
Результат void