C# Class Goedel.Cryptography.CryptoCatalog

Manages a cryptographic catalog and associated key management functions.
Show file Open project: hallambaker/Mathematical-Mesh Class Usage Examples

Public Properties

Property Type Description
Algorithms CryptoAlgorithm[]

Public Methods

Method Description
Add ( CryptoProvider CryptoProvider ) : void

Add a cryptographic algorithm provider to the catalog

CryptoCatalog ( ) : System

Create and populate a new catalog of cryptographic algorithms including the default providers for all the standard algorithms.

Get ( CryptoAlgorithmID ID ) : CryptoProvider

Get a cryptographic provider by algorithm identifier

Get ( CryptoAlgorithmID ID, CryptoAlgorithmID Bulk ) : CryptoProvider

Get a cryptographic provider by algorithm identifier

GetAsymmetric ( CryptoAlgorithmID ID ) : CryptoProviderAsymmetric

Get a cryptographic provider by algorithm identifier

GetAuthentication ( CryptoAlgorithmID ID ) : CryptoProviderAuthentication

Get a cryptographic provider by algorithm identifier

GetBits ( int Bits ) : byte[]

Returns a byte array with the specified number of random bits.

GetBytes ( int Bytes ) : byte[]

Returns a byte array with the specified number of random bytes.

GetDigest ( CryptoAlgorithmID ID ) : CryptoProviderDigest

Get a cryptographic provider by algorithm identifier

GetEncryption ( CryptoAlgorithmID ID ) : CryptoProviderEncryption

Get a cryptographic provider by algorithm identifier

GetExchange ( CryptoAlgorithmID ID ) : CryptoProviderExchange

Get a cryptographic provider by algorithm identifier

GetExchange ( CryptoAlgorithmID Signature, CryptoAlgorithmID Digest ) : CryptoProviderExchange

Get a signature provider by algorithm identifier

GetExchange ( string UDF ) : CryptoProviderExchange

Get an exchange provider by key fingerprint.

GetSignature ( CryptoAlgorithmID ID ) : CryptoProviderSignature

Get a cryptographic provider by algorithm identifier

GetSignature ( CryptoAlgorithmID Signature, CryptoAlgorithmID Digest ) : CryptoProviderSignature

Get a signature provider by algorithm identifier

GetSignature ( string UDF ) : CryptoProviderSignature

Get a signature provider by key fingerprint.

Private Methods

Method Description
OrDefault ( CryptoAlgorithmID Value, CryptoAlgorithmID Default ) : CryptoAlgorithmID
SetDefault ( CryptoAlgorithmID &Current, CryptoAlgorithm New, CryptoAlgorithmID ID, CryptoAlgorithmClass Class ) : void

Method Details

Add() public method

Add a cryptographic algorithm provider to the catalog
public Add ( CryptoProvider CryptoProvider ) : void
CryptoProvider CryptoProvider
return void

CryptoCatalog() public method

Create and populate a new catalog of cryptographic algorithms including the default providers for all the standard algorithms.
public CryptoCatalog ( ) : System
return System

Get() public method

Get a cryptographic provider by algorithm identifier
public Get ( CryptoAlgorithmID ID ) : CryptoProvider
ID CryptoAlgorithmID Principal algorithm identifier.
return CryptoProvider

Get() public method

Get a cryptographic provider by algorithm identifier
public Get ( CryptoAlgorithmID ID, CryptoAlgorithmID Bulk ) : CryptoProvider
ID CryptoAlgorithmID Principal algorithm identifier.
Bulk CryptoAlgorithmID Bulk algorithm identifier.
return CryptoProvider

GetAsymmetric() public method

Get a cryptographic provider by algorithm identifier
public GetAsymmetric ( CryptoAlgorithmID ID ) : CryptoProviderAsymmetric
ID CryptoAlgorithmID Algorithm identifier
return CryptoProviderAsymmetric

GetAuthentication() public method

Get a cryptographic provider by algorithm identifier
public GetAuthentication ( CryptoAlgorithmID ID ) : CryptoProviderAuthentication
ID CryptoAlgorithmID Algorithm identifier
return CryptoProviderAuthentication

GetBits() public static method

Returns a byte array with the specified number of random bits.
public static GetBits ( int Bits ) : byte[]
Bits int Number of bits
return byte[]

GetBytes() public static method

Returns a byte array with the specified number of random bytes.
public static GetBytes ( int Bytes ) : byte[]
Bytes int Number of bytes
return byte[]

GetDigest() public method

Get a cryptographic provider by algorithm identifier
public GetDigest ( CryptoAlgorithmID ID ) : CryptoProviderDigest
ID CryptoAlgorithmID Algorithm identifier
return CryptoProviderDigest

GetEncryption() public method

Get a cryptographic provider by algorithm identifier
public GetEncryption ( CryptoAlgorithmID ID ) : CryptoProviderEncryption
ID CryptoAlgorithmID Algorithm identifier
return CryptoProviderEncryption

GetExchange() public method

Get a cryptographic provider by algorithm identifier
public GetExchange ( CryptoAlgorithmID ID ) : CryptoProviderExchange
ID CryptoAlgorithmID Algorithm identifier
return CryptoProviderExchange

GetExchange() public method

Get a signature provider by algorithm identifier
public GetExchange ( CryptoAlgorithmID Signature, CryptoAlgorithmID Digest ) : CryptoProviderExchange
Signature CryptoAlgorithmID Signature algorithm identifier.
Digest CryptoAlgorithmID Digest algorithm identifer.
return CryptoProviderExchange

GetExchange() public method

Get an exchange provider by key fingerprint.
public GetExchange ( string UDF ) : CryptoProviderExchange
UDF string Fingerprint of key
return CryptoProviderExchange

GetSignature() public method

Get a cryptographic provider by algorithm identifier
public GetSignature ( CryptoAlgorithmID ID ) : CryptoProviderSignature
ID CryptoAlgorithmID Algorithm identifier
return CryptoProviderSignature

GetSignature() public method

Get a signature provider by algorithm identifier
public GetSignature ( CryptoAlgorithmID Signature, CryptoAlgorithmID Digest ) : CryptoProviderSignature
Signature CryptoAlgorithmID Signature algorithm identifier.
Digest CryptoAlgorithmID Digest algorithm identifer.
return CryptoProviderSignature

GetSignature() public method

Get a signature provider by key fingerprint.
public GetSignature ( string UDF ) : CryptoProviderSignature
UDF string Fingerprint of key
return CryptoProviderSignature

Property Details

Algorithms public property

Array containing the registered algorithms.
public CryptoAlgorithm[] Algorithms
return CryptoAlgorithm[]