C# Класс Goedel.Cryptography.UDF

Class implementing the Uniform Data Fingerprint spec.
Показать файл Открыть проект

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

Метод Описание
From ( string ContentType, byte Data, int Bits ) : byte[]

Compute UDF from binary data and content type with specified precision.

FromEscrowed ( byte Data, int Bits ) : byte[]

Calculate a UDF fingerprint from a secret key used to escrow a private key in the mesh.

FromKeyInfo ( byte Data ) : byte[]

Calculate a UDF fingerprint from a PKIX KeyInfo blob with specified precision.

FromKeyInfo ( byte Data, int Bits ) : byte[]

Calculate a UDF fingerprint from a PKIX KeyInfo blob with specified precision.

Random ( ) : string

Return a random sequence as a UDF

Random ( int Bits ) : string

Return a random sequence as a UDF

SHA1 ( byte Data ) : byte[]

Calculate a SHA-1 fingerprint

SHA256 ( byte Data ) : byte[]

Calculate a SHA-1 fingerprint

ToString ( byte Data ) : string

Convert a binary UDF to a string.

ToString ( string ContentType, byte Data, int Bits ) : string

Calculate a UDF fingerprint from an OpenPGP key with specified precision.

Validate ( string Test, string Value ) : void

Check that a UDF fingerprint satisfies a test value. At present the test must be exact. It is possible that this can be relaxed so that a longer fingerprint will satisfy a shorter one.

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

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

Compute UDF from binary data and content type with specified precision.
public static From ( string ContentType, byte Data, int Bits ) : byte[]
ContentType string MIME media type. See /// http://www.iana.org/assignments/media-types/media-types.xhtml for list.
Data byte Data to be fingerprinted.
Bits int Precision, must be a multiple of 25 bits.
Результат byte[]

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

Calculate a UDF fingerprint from a secret key used to escrow a private key in the mesh.
public static FromEscrowed ( byte Data, int Bits ) : byte[]
Data byte Data to be fingerprinted.
Bits int Precision, must be a multiple of 25 bits.
Результат byte[]

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

Calculate a UDF fingerprint from a PKIX KeyInfo blob with specified precision.
public static FromKeyInfo ( byte Data ) : byte[]
Data byte Data to be fingerprinted.
Результат byte[]

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

Calculate a UDF fingerprint from a PKIX KeyInfo blob with specified precision.
public static FromKeyInfo ( byte Data, int Bits ) : byte[]
Data byte Data to be fingerprinted.
Bits int Precision, must be a multiple of 25 bits.
Результат byte[]

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

Return a random sequence as a UDF
public static Random ( ) : string
Результат string

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

Return a random sequence as a UDF
public static Random ( int Bits ) : string
Bits int
Результат string

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

Calculate a SHA-1 fingerprint
public static SHA1 ( byte Data ) : byte[]
Data byte Data to be fingerprinted
Результат byte[]

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

Calculate a SHA-1 fingerprint
public static SHA256 ( byte Data ) : byte[]
Data byte Data to be fingerprinted
Результат byte[]

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

Convert a binary UDF to a string.
public static ToString ( byte Data ) : string
Data byte
Результат string

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

Calculate a UDF fingerprint from an OpenPGP key with specified precision.
public static ToString ( string ContentType, byte Data, int Bits ) : string
ContentType string MIME media type of data being fingerprinted.
Data byte Data to be fingerprinted.
Bits int Precision, must be a multiple of 25 bits.
Результат string

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

Check that a UDF fingerprint satisfies a test value. At present the test must be exact. It is possible that this can be relaxed so that a longer fingerprint will satisfy a shorter one.
public static Validate ( string Test, string Value ) : void
Test string
Value string
Результат void