Craig's Utility Library
4.0 Beta
|
Asymmetric encryptor More...
Public Member Functions | |
string | CreateKey (bool PrivatePublic) |
Creates a new set of keys More... | |
byte[] | Decrypt (byte[] Input, string Key) |
Decrypts a byte array using RSA More... | |
byte[] | Encrypt (byte[] Input, string Key) |
Encrypts a string using RSA More... | |
string | SignHash (string Input, string Key, out string Hash, Encoding EncodingUsing=null) |
Takes a string and creates a signed hash of it More... | |
bool | VerifyHash (string Hash, string SignedHash, string Key) |
Verifies a signed hash against the unsigned version More... | |
Properties | |
string | Name [get] |
Name of the encryptor More... | |
Asymmetric encryptor
Definition at line 29 of file IAsymmetric.cs.
string Utilities.IO.Encryption.Interfaces.IAsymmetric.CreateKey | ( | bool | PrivatePublic | ) |
Creates a new set of keys
PrivatePublic | True if private key should be included, false otherwise |
Implemented in Utilities.IO.Encryption.BaseClasses.AsymmetricBase.
byte [] Utilities.IO.Encryption.Interfaces.IAsymmetric.Decrypt | ( | byte[] | Input, |
string | Key | ||
) |
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 |
Implemented in Utilities.IO.Encryption.BaseClasses.AsymmetricBase, and Utilities.IO.Encryption.Default.RSA.
byte [] Utilities.IO.Encryption.Interfaces.IAsymmetric.Encrypt | ( | byte[] | Input, |
string | Key | ||
) |
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 |
Implemented in Utilities.IO.Encryption.BaseClasses.AsymmetricBase, and Utilities.IO.Encryption.Default.RSA.
string Utilities.IO.Encryption.Interfaces.IAsymmetric.SignHash | ( | string | Input, |
string | Key, | ||
out string | Hash, | ||
Encoding | EncodingUsing = null |
||
) |
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) |
Implemented in Utilities.IO.Encryption.Default.RSA, and Utilities.IO.Encryption.BaseClasses.AsymmetricBase.
bool Utilities.IO.Encryption.Interfaces.IAsymmetric.VerifyHash | ( | string | Hash, |
string | SignedHash, | ||
string | Key | ||
) |
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 |
Implemented in Utilities.IO.Encryption.Default.RSA, and Utilities.IO.Encryption.BaseClasses.AsymmetricBase.
|
get |
Name of the encryptor
Definition at line 34 of file IAsymmetric.cs.