Craig's Utility Library  4.0 Beta
Utilities.IO.Encryption.Interfaces.ISymmetric Interface Reference

Symmetric encryption More...

Inheritance diagram for Utilities.IO.Encryption.Interfaces.ISymmetric:
Utilities.IO.Encryption.BaseClasses.SymmetricBase Utilities.IO.Encryption.Default.Symmetric

Public Member Functions

bool CanHandle (string Algorithm)
 Can this handle the algorithm specified 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, DeriveBytes Key, string Algorithm="AES", 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...
 

Properties

string Name [get]
 Name of the symmetric encryptor More...
 

Detailed Description

Symmetric encryption

Definition at line 29 of file ISymmetric.cs.

Member Function Documentation

bool Utilities.IO.Encryption.Interfaces.ISymmetric.CanHandle ( string  Algorithm)

Can this handle the algorithm specified

Parameters
AlgorithmThe algorithm name
Returns
True if it can, false otherwise

Implemented in Utilities.IO.Encryption.BaseClasses.SymmetricBase.

byte [] Utilities.IO.Encryption.Interfaces.ISymmetric.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

Parameters
DataData to be decrypted
KeyPassword to decrypt with
AlgorithmAlgorithm to use for decryption
SaltSalt to decrypt with
HashAlgorithmCan be either SHA1 or MD5
PasswordIterationsNumber of iterations to do
InitialVectorNeeds to be 16 ASCII characters long
KeySizeCan be 64 (DES only), 128 (AES), 192 (AES and Triple DES), or 256 (AES)
Returns
A decrypted byte array

Implemented in Utilities.IO.Encryption.BaseClasses.SymmetricBase.

byte [] Utilities.IO.Encryption.Interfaces.ISymmetric.Decrypt ( byte[]  Data,
DeriveBytes  Key,
string  Algorithm = "AES",
string  InitialVector = "OFRna73m*aze01xY",
int  KeySize = 256 
)

Decrypts a byte array

Parameters
DataData to be decrypted
KeyPassword to decrypt with
AlgorithmAlgorithm to use for decryption
InitialVectorNeeds to be 16 ASCII characters long
KeySizeCan be 64 (DES only), 128 (AES), 192 (AES and Triple DES), or 256 (AES)
Returns
A decrypted byte array

Implemented in Utilities.IO.Encryption.BaseClasses.SymmetricBase.

byte [] Utilities.IO.Encryption.Interfaces.ISymmetric.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

Parameters
DataData to be encrypted
KeyPassword to encrypt with
SaltSalt to encrypt with
HashAlgorithmCan be either SHA1 or MD5
PasswordIterationsNumber of iterations to do
InitialVectorNeeds to be 16 ASCII characters long
KeySizeCan be 64 (DES only), 128 (AES), 192 (AES and Triple DES), or 256 (AES)
AlgorithmAlgorithm
Returns
An encrypted byte array

Implemented in Utilities.IO.Encryption.BaseClasses.SymmetricBase.

byte [] Utilities.IO.Encryption.Interfaces.ISymmetric.Encrypt ( byte[]  Data,
DeriveBytes  Key,
string  Algorithm = "AES",
string  InitialVector = "OFRna73m*aze01xY",
int  KeySize = 256 
)

Encrypts a byte array

Parameters
DataData to be encrypted
KeyPassword to encrypt with
InitialVectorNeeds to be 16 ASCII characters long
KeySizeCan be 64 (DES only), 128 (AES), 192 (AES and Triple DES), or 256 (AES)
AlgorithmAlgorithm
Returns
An encrypted byte array

Implemented in Utilities.IO.Encryption.BaseClasses.SymmetricBase.

Property Documentation

string Utilities.IO.Encryption.Interfaces.ISymmetric.Name
get

Name of the symmetric encryptor

Definition at line 34 of file ISymmetric.cs.


The documentation for this interface was generated from the following file: