Craig's Utility Library
4.0 Beta
|
Asymmetric base class More...
Public Member Functions | |
string | CreateKey (bool PrivatePublic) |
Creates a new set of keys More... | |
abstract byte[] | Decrypt (byte[] Input, string Key) |
Decrypts a byte array using RSA More... | |
abstract byte[] | Encrypt (byte[] Input, string Key) |
Encrypts a string using RSA More... | |
abstract string | SignHash (string Input, string Key, out string Hash, Encoding EncodingUsing=null) |
Takes a string and creates a signed hash of it More... | |
abstract bool | VerifyHash (string Hash, string SignedHash, string Key) |
Verifies a signed hash against the unsigned version More... | |
Protected Member Functions | |
AsymmetricBase () | |
Constructor More... | |
abstract AsymmetricAlgorithm | GetProvider () |
Gets the provider used More... | |
Properties | |
abstract string | Name [get] |
Name of the encryptor More... | |
Properties inherited from Utilities.IO.Encryption.Interfaces.IAsymmetric | |
string | Name [get] |
Name of the encryptor More... | |
Asymmetric base class
Definition at line 31 of file AsymmetricBase.cs.
|
protected |
Constructor
Definition at line 36 of file AsymmetricBase.cs.
string Utilities.IO.Encryption.BaseClasses.AsymmetricBase.CreateKey | ( | bool | PrivatePublic | ) |
Creates a new set of keys
PrivatePublic | True if private key should be included, false otherwise |
Implements Utilities.IO.Encryption.Interfaces.IAsymmetric.
Definition at line 50 of file AsymmetricBase.cs.
|
pure virtual |
Decrypts a byte array using RSA
Input | Input byte array (should be small as anything over 128 bytes can not be decrypted) |
Key | Key to use for decryption |
Implements Utilities.IO.Encryption.Interfaces.IAsymmetric.
Implemented in Utilities.IO.Encryption.Default.RSA.
|
pure virtual |
Encrypts a string using RSA
Input | Input byte array (should be small as anything over 128 bytes can not be decrypted) |
Key | Key to use for encryption |
Implements Utilities.IO.Encryption.Interfaces.IAsymmetric.
Implemented in Utilities.IO.Encryption.Default.RSA.
|
protectedpure virtual |
Gets the provider used
Implemented in Utilities.IO.Encryption.Default.RSA.
|
pure virtual |
Takes a string and creates a signed hash of it
Input | Input string |
Key | Key to encrypt/sign with |
Hash | This will be filled with the unsigned hash |
EncodingUsing | Encoding that the input is using (defaults to UTF8) |
Implements Utilities.IO.Encryption.Interfaces.IAsymmetric.
Implemented in Utilities.IO.Encryption.Default.RSA.
|
pure virtual |
Verifies a signed hash against the unsigned version
Hash | The unsigned hash (should be 64bit string) |
SignedHash | The signed hash (should be 64bit string) |
Key | The key to use in decryption |
Implements Utilities.IO.Encryption.Interfaces.IAsymmetric.
Implemented in Utilities.IO.Encryption.Default.RSA.
|
get |
Name of the encryptor
Definition at line 43 of file AsymmetricBase.cs.