AsymmetricCryptographer

Asymmetric cryptographic utilities.

Namespace:
Inetdev.Security.Cryptography
Type:
Class
Public:
Yes
Protected:
No
Sealed:
Yes
Abstract:
No
Inherits from:
System.Object

Constructors

AsymmetricCryptographer

Default constructor

Signature:
public Void AsymmetricCryptographer()

AsymmetricCryptographer

Initializes a new instance of AsymmetricCryptographer.

Signature:
public Void AsymmetricCryptographer(keyStore)
Parameters
Name Type Summary
keyStore IAsymmetricKeyStore An IAsymmetricKeyStore.
Exceptions
Type Summary
ArgumentNullException Thrown when keyStore is null.

Properties

KeyStore

An IAsymmetricKeyStore to get the keys

Signature:
public IAsymmetricKeyStore KeyStore { get; set; }

Methods

DecryptPackage

Decrypts the information contained within the ciphered package.

Signature:
public Void DecryptPackage(ciphered, plaintext)
Parameters
Name Type Summary
ciphered Stream Ciphered package to decrypt.
plaintext Stream Decrypted data from the ciphered package.
Exceptions
Type Summary
ArgumentNullException

Thrown when ciphered is null.

-or- plaintext is null.

CryptographyException Thrown when an error occurs while decrypting the data.
AsymmetricKeyNotFoundException Thrown when the key could not be found.
MissingRequiredPropertyException Thrown when the object was not correctly initialized.

EncryptPackage

Encrypts plaintext into a ciphered package.

Signature:
public Void EncryptPackage(plaintext, ciphered)
Parameters
Name Type Summary
plaintext Stream Information to be ciphered.
ciphered Stream Ciphered information
Exceptions
Type Summary
ArgumentNullException

Thrown when ciphered is null.

-or- plaintext is null.

CryptographyException Thrown when an error occurs while encrypting the data.
AsymmetricKeyNotFoundException Thrown when the key could not be found.
MissingRequiredPropertyException Thrown when the object was not correctly initialized.