C# Class Keyczar.Util.Utility

Utility methods
Afficher le fichier Open project: jbtule/keyczar-dotnet

Méthodes publiques

Méthode Description
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.

Method Details

CopyProperties() public static méthode

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.
Résultat void

CopyProperties() public static méthode

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.
Résultat void

GetBytes() public static méthode

Gets the bytes for a long laid out big endian
public static GetBytes ( System.Numerics.BigInteger data ) : byte[]
data System.Numerics.BigInteger The data.
Résultat byte[]

GetBytes() public static méthode

Gets the bytes for an int laid out big endian
public static GetBytes ( int data ) : byte[]
data int The data.
Résultat byte[]

GetBytes() public static méthode

Gets the bytes for a long laid out big endian
public static GetBytes ( long data ) : byte[]
data long The data.
Résultat byte[]

HashKey() public static méthode

Hashes the key for keyczar version look ups.
public static HashKey ( int size ) : byte[]
size int The size.
Résultat byte[]

HashKeyLengthPrefix() public static méthode

Hashes each component of the key hash with it's length first.
public static HashKeyLengthPrefix ( int size ) : byte[]
size int The size.
Résultat byte[]

ReadHeader() public static méthode

Reads the keyczar header.
public static ReadHeader ( Stream data, byte &keyHash ) : byte[]
data Stream The data.
keyHash byte The key hash.
Résultat byte[]

ReadHeader() public static méthode

Reads the keyczar header.
public static ReadHeader ( byte data, byte &keyHash ) : byte[]
data byte The data.
keyHash byte The key hash.
Résultat byte[]

ResetStreamWhenFinished() public static méthode

Resets the stream poisition when Closed or Disposed.
public static ResetStreamWhenFinished ( Stream stream ) : NondestructiveStreamReset
stream Stream The stream.
Résultat NondestructiveStreamReset

StripLeadingZeros() public static méthode

Strips the leading zeros from a byte array.
public static StripLeadingZeros ( byte data ) : byte[]
data byte The data.
Résultat byte[]

ToBigInteger() public static méthode

To the BigInteger from big endian bytes.
public static ToBigInteger ( byte data ) : System.Numerics.BigInteger
data byte The data.
Résultat System.Numerics.BigInteger

ToBouncyBigInteger() public static méthode

To the bouncy castle big integer.
public static ToBouncyBigInteger ( this value ) : Org.BouncyCastle.Math.BigInteger
value this The value.
Résultat Org.BouncyCastle.Math.BigInteger

ToBson() public static méthode

Bson Serializes the object.
public static ToBson ( this value ) : byte[]
value this The obj.
Résultat byte[]

ToInt32() public static méthode

To the int32 from big endian bytes.
public static ToInt32 ( byte data ) : int
data byte The data.
Résultat int

ToInt64() public static méthode

To the int64 from big endian bytes.
public static ToInt64 ( byte data ) : long
data byte The data.
Résultat long

ToJson() public static méthode

Json Serializes the object.
public static ToJson ( this value ) : string
value this The obj.
Résultat string

ToSystemBigInteger() public static méthode

To the system standard big integer.
public static ToSystemBigInteger ( this value ) : System.Numerics.BigInteger
value this The value.
Résultat System.Numerics.BigInteger