Craig's Utility Library
4.0 Beta
|
Symmetric base class More...
Public Member Functions | |
bool | CanHandle (string Algorithm) |
Can this handle the algorithm specified More... | |
byte[] | Decrypt (byte[] Data, DeriveBytes Key, string Algorithm="AES", string InitialVector="OFRna73m*aze01xY", int KeySize=256) |
Decrypts a byte array More... | |
byte[] | Decrypt (byte[] Data, string Key, string Algorithm, string Salt="Kosher", string HashAlgorithm="SHA1", int PasswordIterations=2, string InitialVector="OFRna73m*aze01xY", int KeySize=256) |
Decrypts a byte array More... | |
byte[] | Encrypt (byte[] Data, string Key, string Algorithm, string Salt="Kosher", string HashAlgorithm="SHA1", int PasswordIterations=2, string InitialVector="OFRna73m*aze01xY", int KeySize=256) |
Encrypts a byte array More... | |
byte[] | Encrypt (byte[] Data, DeriveBytes Key, string Algorithm="AES", string InitialVector="OFRna73m*aze01xY", int KeySize=256) |
Encrypts a byte array More... | |
Protected Member Functions | |
SymmetricBase () | |
Constructor More... | |
SymmetricAlgorithm | GetProvider (string Algorithm) |
Gets the symmetric algorithm More... | |
Properties | |
abstract string | Name [get] |
Name More... | |
IDictionary< string, Func< SymmetricAlgorithm > > | ImplementedAlgorithms [get] |
Algorithms this implements More... | |
Properties inherited from Utilities.IO.Encryption.Interfaces.ISymmetric | |
string | Name [get] |
Name of the symmetric encryptor More... | |
Symmetric base class
Definition at line 35 of file SymmetricBase.cs.
|
protected |
Constructor
Definition at line 40 of file SymmetricBase.cs.
bool Utilities.IO.Encryption.BaseClasses.SymmetricBase.CanHandle | ( | string | Algorithm | ) |
Can this handle the algorithm specified
Algorithm | The algorithm name |
Implements Utilities.IO.Encryption.Interfaces.ISymmetric.
Definition at line 60 of file SymmetricBase.cs.
byte [] Utilities.IO.Encryption.BaseClasses.SymmetricBase.Decrypt | ( | byte[] | Data, |
DeriveBytes | Key, | ||
string | Algorithm = "AES" , |
||
string | InitialVector = "OFRna73m*aze01xY" , |
||
int | KeySize = 256 |
||
) |
Decrypts a byte array
Data | Data to be decrypted |
Key | Password to decrypt with |
Algorithm | Algorithm to use for decryption |
InitialVector | Needs to be 16 ASCII characters long |
KeySize | Can be 64 (DES only), 128 (AES), 192 (AES and Triple DES), or 256 (AES) |
Implements Utilities.IO.Encryption.Interfaces.ISymmetric.
Definition at line 76 of file SymmetricBase.cs.
byte [] Utilities.IO.Encryption.BaseClasses.SymmetricBase.Decrypt | ( | byte[] | Data, |
string | Key, | ||
string | Algorithm, | ||
string | Salt = "Kosher" , |
||
string | HashAlgorithm = "SHA1" , |
||
int | PasswordIterations = 2 , |
||
string | InitialVector = "OFRna73m*aze01xY" , |
||
int | KeySize = 256 |
||
) |
Decrypts a byte array
Data | Data to be decrypted |
Key | Password to decrypt with |
Algorithm | Algorithm to use for decryption |
Salt | Salt to decrypt with |
HashAlgorithm | Can be either SHA1 or MD5 |
PasswordIterations | Number of iterations to do |
InitialVector | Needs to be 16 ASCII characters long |
KeySize | Can be 64 (DES only), 128 (AES), 192 (AES and Triple DES), or 256 (AES) |
Implements Utilities.IO.Encryption.Interfaces.ISymmetric.
Definition at line 118 of file SymmetricBase.cs.
byte [] Utilities.IO.Encryption.BaseClasses.SymmetricBase.Encrypt | ( | byte[] | Data, |
string | Key, | ||
string | Algorithm, | ||
string | Salt = "Kosher" , |
||
string | HashAlgorithm = "SHA1" , |
||
int | PasswordIterations = 2 , |
||
string | InitialVector = "OFRna73m*aze01xY" , |
||
int | KeySize = 256 |
||
) |
Encrypts a byte array
Data | Data to be encrypted |
Key | Password to encrypt with |
Salt | Salt to encrypt with |
HashAlgorithm | Can be either SHA1 or MD5 |
PasswordIterations | Number of iterations to do |
InitialVector | Needs to be 16 ASCII characters long |
KeySize | Can be 64 (DES only), 128 (AES), 192 (AES and Triple DES), or 256 (AES) |
Algorithm | Algorithm to use |
Implements Utilities.IO.Encryption.Interfaces.ISymmetric.
Definition at line 140 of file SymmetricBase.cs.
byte [] Utilities.IO.Encryption.BaseClasses.SymmetricBase.Encrypt | ( | byte[] | Data, |
DeriveBytes | Key, | ||
string | Algorithm = "AES" , |
||
string | InitialVector = "OFRna73m*aze01xY" , |
||
int | KeySize = 256 |
||
) |
Encrypts a byte array
Data | Data to be encrypted |
Key | Password to encrypt with |
InitialVector | Needs to be 16 ASCII characters long |
KeySize | Can be 64 (DES only), 128 (AES), 192 (AES and Triple DES), or 256 (AES) |
Algorithm | Algorithm to use |
Implements Utilities.IO.Encryption.Interfaces.ISymmetric.
Definition at line 159 of file SymmetricBase.cs.
|
protected |
Gets the symmetric algorithm
Definition at line 193 of file SymmetricBase.cs.
|
getprotected |
Algorithms this implements
Definition at line 53 of file SymmetricBase.cs.
|
get |
Name
Definition at line 48 of file SymmetricBase.cs.