C# Класс Keyczar.Util.Utility

Utility methods
Показать файл Открыть проект

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

Метод Описание
CopyProperties ( object>.IDictionary source, object destination ) : void

Copies string/object dictionary to the destnation objects properties.

CopyProperties ( object source, object destination ) : void

Copies the properties from one object to the next

GetBytes ( System.Numerics.BigInteger data ) : byte[]

Gets the bytes for a long laid out big endian

GetBytes ( int data ) : byte[]

Gets the bytes for an int laid out big endian

GetBytes ( long data ) : byte[]

Gets the bytes for a long laid out big endian

HashKey ( int size ) : byte[]

Hashes the key for keyczar version look ups.

HashKeyLengthPrefix ( int size ) : byte[]

Hashes each component of the key hash with it's length first.

ReadHeader ( Stream data, byte &keyHash ) : byte[]

Reads the keyczar header.

ReadHeader ( byte data, byte &keyHash ) : byte[]

Reads the keyczar header.

ResetStreamWhenFinished ( Stream stream ) : NondestructiveStreamReset

Resets the stream poisition when Closed or Disposed.

StripLeadingZeros ( byte data ) : byte[]

Strips the leading zeros from a byte array.

ToBigInteger ( byte data ) : System.Numerics.BigInteger

To the BigInteger from big endian bytes.

ToBouncyBigInteger ( this value ) : Org.BouncyCastle.Math.BigInteger

To the bouncy castle big integer.

ToBson ( this value ) : byte[]

Bson Serializes the object.

ToInt32 ( byte data ) : int

To the int32 from big endian bytes.

ToInt64 ( byte data ) : long

To the int64 from big endian bytes.

ToJson ( this value ) : string

Json Serializes the object.

ToSystemBigInteger ( this value ) : System.Numerics.BigInteger

To the system standard big integer.

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

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

Copies string/object dictionary to the destnation objects properties.
public static CopyProperties ( object>.IDictionary source, object destination ) : void
source object>.IDictionary The source.
destination object The dest.
Результат void

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

Copies the properties from one object to the next
public static CopyProperties ( object source, object destination ) : void
source object The source.
destination object The dest.
Результат void

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

Gets the bytes for a long laid out big endian
public static GetBytes ( System.Numerics.BigInteger data ) : byte[]
data System.Numerics.BigInteger The data.
Результат byte[]

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

Gets the bytes for an int laid out big endian
public static GetBytes ( int data ) : byte[]
data int The data.
Результат byte[]

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

Gets the bytes for a long laid out big endian
public static GetBytes ( long data ) : byte[]
data long The data.
Результат byte[]

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

Hashes the key for keyczar version look ups.
public static HashKey ( int size ) : byte[]
size int The size.
Результат byte[]

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

Hashes each component of the key hash with it's length first.
public static HashKeyLengthPrefix ( int size ) : byte[]
size int The size.
Результат byte[]

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

Reads the keyczar header.
public static ReadHeader ( Stream data, byte &keyHash ) : byte[]
data Stream The data.
keyHash byte The key hash.
Результат byte[]

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

Reads the keyczar header.
public static ReadHeader ( byte data, byte &keyHash ) : byte[]
data byte The data.
keyHash byte The key hash.
Результат byte[]

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

Resets the stream poisition when Closed or Disposed.
public static ResetStreamWhenFinished ( Stream stream ) : NondestructiveStreamReset
stream Stream The stream.
Результат NondestructiveStreamReset

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

Strips the leading zeros from a byte array.
public static StripLeadingZeros ( byte data ) : byte[]
data byte The data.
Результат byte[]

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

To the BigInteger from big endian bytes.
public static ToBigInteger ( byte data ) : System.Numerics.BigInteger
data byte The data.
Результат System.Numerics.BigInteger

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

To the bouncy castle big integer.
public static ToBouncyBigInteger ( this value ) : Org.BouncyCastle.Math.BigInteger
value this The value.
Результат Org.BouncyCastle.Math.BigInteger

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

Bson Serializes the object.
public static ToBson ( this value ) : byte[]
value this The obj.
Результат byte[]

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

To the int32 from big endian bytes.
public static ToInt32 ( byte data ) : int
data byte The data.
Результат int

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

To the int64 from big endian bytes.
public static ToInt64 ( byte data ) : long
data byte The data.
Результат long

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

Json Serializes the object.
public static ToJson ( this value ) : string
value this The obj.
Результат string

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

To the system standard big integer.
public static ToSystemBigInteger ( this value ) : System.Numerics.BigInteger
value this The value.
Результат System.Numerics.BigInteger