|
Craig's Utility Library
4.0 Beta
|
Compression manager More...
Public Member Functions | |
| Manager (IEnumerable< IAsymmetric > Asymmetric, IEnumerable< IHasher > Hashers, IEnumerable< IShift > Shifts, IEnumerable< ISymmetric > Symmetric) | |
| Constructor More... | |
| string | CreateKey (bool PrivatePublic) |
| Creates a new set of keys 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[] | Decrypt (byte[] Data, byte[] Key) |
| Decrypt the data based on the key More... | |
| byte[] | Decrypt (byte[] Input, string Key) |
| Decrypts a byte array using RSA More... | |
| byte[] | Encrypt (byte[] Data, DeriveBytes Key, string Algorithm="AES", string InitialVector="OFRna73m*aze01xY", int KeySize=256) |
| Encrypts 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, byte[] Key) |
| Encrypts the data based on the key More... | |
| byte[] | Encrypt (byte[] Input, string Key) |
| Encrypts a string using RSA More... | |
| byte[] | Hash (byte[] Data, string Algorithm) |
| Hashes the data More... | |
| string | SignHash (string Input, string Key, out string Hash, Encoding EncodingUsing=null) |
| Takes a string and creates a signed hash of it More... | |
| override string | ToString () |
| String info for the manager More... | |
| bool | VerifyHash (string Hash, string SignedHash, string Key) |
| Verifies a signed hash against the unsigned version More... | |
Properties | |
| IEnumerable< IAsymmetric > | AsymmetricAlgorithms [get] |
| Asymmetric More... | |
| IEnumerable< IHasher > | HasherAlgorithms [get] |
| Hashers More... | |
| IEnumerable< IShift > | ShiftAlgorithms [get] |
| Shift More... | |
| IEnumerable< ISymmetric > | SymmetricAlgorithms [get] |
| Symmetric More... | |
Compression manager
Definition at line 36 of file Manager.cs.
| Utilities.IO.Encryption.Manager.Manager | ( | IEnumerable< IAsymmetric > | Asymmetric, |
| IEnumerable< IHasher > | Hashers, | ||
| IEnumerable< IShift > | Shifts, | ||
| IEnumerable< ISymmetric > | Symmetric | ||
| ) |
Constructor
| Asymmetric | The asymmetric. |
| Hashers | The hashers. |
| Shifts | The shifts. |
| Symmetric | The symmetric. |
Definition at line 45 of file Manager.cs.
| string Utilities.IO.Encryption.Manager.CreateKey | ( | bool | PrivatePublic | ) |
Creates a new set of keys
| PrivatePublic | True if private key should be included, false otherwise |
Definition at line 78 of file Manager.cs.
| byte [] Utilities.IO.Encryption.Manager.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) |
Definition at line 98 of file Manager.cs.
| byte [] Utilities.IO.Encryption.Manager.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) |
Definition at line 124 of file Manager.cs.
| byte [] Utilities.IO.Encryption.Manager.Decrypt | ( | byte[] | Data, |
| byte[] | Key | ||
| ) |
Decrypt the data based on the key
| Data | Data to encrypt |
| Key | Key to use |
Definition at line 145 of file Manager.cs.
| byte [] Utilities.IO.Encryption.Manager.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 |
Definition at line 162 of file Manager.cs.
| byte [] Utilities.IO.Encryption.Manager.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 |
Definition at line 182 of file Manager.cs.
| byte [] Utilities.IO.Encryption.Manager.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 |
Definition at line 208 of file Manager.cs.
| byte [] Utilities.IO.Encryption.Manager.Encrypt | ( | byte[] | Data, |
| byte[] | Key | ||
| ) |
Encrypts the data based on the key
| Data | Data to encrypt |
| Key | Key to use |
Definition at line 229 of file Manager.cs.
| byte [] Utilities.IO.Encryption.Manager.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 |
Definition at line 246 of file Manager.cs.
| byte [] Utilities.IO.Encryption.Manager.Hash | ( | byte[] | Data, |
| string | Algorithm | ||
| ) |
Hashes the data
| Data | Data to hash |
| Algorithm | Algorithm |
Definition at line 261 of file Manager.cs.
| string Utilities.IO.Encryption.Manager.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) |
Definition at line 278 of file Manager.cs.
| override string Utilities.IO.Encryption.Manager.ToString | ( | ) |
String info for the manager
Definition at line 291 of file Manager.cs.
| bool Utilities.IO.Encryption.Manager.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 |
Definition at line 308 of file Manager.cs.
|
get |
Asymmetric
Definition at line 56 of file Manager.cs.
|
get |
Hashers
Definition at line 61 of file Manager.cs.
|
get |
Shift
Definition at line 66 of file Manager.cs.
|
get |
Symmetric
Definition at line 71 of file Manager.cs.