C# Class System.Utilities.Cryptography.Encryption

Provides encryption and decryption capabilites using 128-bit, 192-bit, and 256-bit AES encryption methods. This implementation is FIPS compliant.
显示文件 Open project: ellipticbit/systemutilities

Public Methods

Method Description
ConvertToUnsecureString ( System securePassword ) : string
Decrypt128Byte ( Stream Data, byte Key ) : byte[]

Decrypts the specified data using a 128-bit cipher. The key can be any length.

Decrypt128Byte ( byte Data, byte Key ) : byte[]

Decrypts the specified data using a 128-bit cipher. The key can be any length.

Decrypt128Stream ( Stream Data, byte Key ) : Stream

Decrypts the specified data using a 128-bit cipher. The key can be any length.

Decrypt128Stream ( byte Data, byte Key ) : Stream

Decrypts the specified data using a 128-bit cipher. The key can be any length.

Decrypt128String ( Stream Data, byte Key ) : string

Decrypts the specified data using a 128-bit cipher. The key can be any length.

Decrypt128String ( byte Data, byte Key ) : string

Decrypts the specified data using a 128-bit cipher. The key can be any length.

Decrypt128StringSecure ( Stream Data, byte Key ) : System.Security.SecureString

Decrypts the specified data using a 128-bit cipher. The key can be any length.

Decrypt128StringSecure ( byte Data, byte Key ) : System.Security.SecureString

Decrypts the specified data using a 128-bit cipher. The key can be any length.

Decrypt192Byte ( Stream Data, byte Key ) : byte[]

Decrypts the specified data using a 192-bit cipher. The key can be any length.

Decrypt192Byte ( byte Data, byte Key ) : byte[]

Decrypts the specified data using a 192-bit cipher. The key can be any length.

Decrypt192Stream ( Stream Data, byte Key ) : Stream

Decrypts the specified data using a 192-bit cipher. The key can be any length.

Decrypt192Stream ( byte Data, byte Key ) : Stream

Decrypts the specified data using a 192-bit cipher. The key can be any length.

Decrypt192String ( Stream Data, byte Key ) : string

Decrypts the specified data using a 192-bit cipher. The key can be any length.

Decrypt192String ( byte Data, byte Key ) : string

Decrypts the specified data using a 192-bit cipher. The key can be any length.

Decrypt192StringSecure ( Stream Data, byte Key ) : System.Security.SecureString

Decrypts the specified data using a 192-bit cipher. The key can be any length.

Decrypt192StringSecure ( byte Data, byte Key ) : System.Security.SecureString

Decrypts the specified data using a 192-bit cipher. The key can be any length.

Decrypt256Byte ( Stream Data, byte Key ) : byte[]

Decrypts the specified data using a 256-bit cipher. The key can be any length.

Decrypt256Byte ( byte Data, byte Key ) : byte[]

Decrypts the specified data using a 256-bit cipher. The key can be any length.

Decrypt256Stream ( Stream Data, byte Key ) : Stream

Decrypts the specified data using a 256-bit cipher. The key can be any length.

Decrypt256Stream ( byte Data, byte Key ) : Stream

Decrypts the specified data using a 256-bit cipher. The key can be any length.

Decrypt256String ( Stream Data, byte Key ) : string

Decrypts the specified data using a 256-bit cipher. The key can be any length.

Decrypt256String ( byte Data, byte Key ) : string

Decrypts the specified data using a 256-bit cipher. The key can be any length.

Decrypt256StringSecure ( Stream Data, byte Key ) : System.Security.SecureString

Decrypts the specified data using a 256-bit cipher. The key can be any length.

Decrypt256StringSecure ( byte Data, byte Key ) : System.Security.SecureString

Decrypts the specified data using a 256-bit cipher. The key can be any length.

Encrypt128Base64 ( Stream Data, byte Key ) : string

Encrypts the specified data using a 128-bit cipher. The key can be any length.

Encrypt128Base64 ( byte Data, byte Key ) : string

Encrypts the specified data using a 128-bit cipher. The key can be any length.

Encrypt128Base64 ( string Data, byte Key ) : string

Encrypts the specified data using a 128-bit cipher. The key can be any length.

Encrypt128Base64Secure ( System Data, byte Key ) : string

Encrypts the specified data using a 128-bit cipher. The key can be any length.

Encrypt128Byte ( Stream Data, byte Key ) : byte[]

Encrypts the specified data using a 128-bit cipher. The key can be any length.

Encrypt128Byte ( byte Data, byte Key ) : byte[]

Encrypts the specified data using a 128-bit cipher. The key can be any length.

Encrypt128Byte ( string Data, byte Key ) : byte[]

Encrypts the specified data using a 128-bit cipher. The key can be any length.

Encrypt128ByteSecure ( System Data, byte Key ) : byte[]

Encrypts the specified data using a 128-bit cipher. The key can be any length.

Encrypt128Stream ( Stream Data, byte Key ) : Stream

Encrypts the specified data using a 128-bit cipher. The key can be any length.

Encrypt128Stream ( byte Data, byte Key ) : Stream

Encrypts the specified data using a 128-bit cipher. The key can be any length.

Encrypt128Stream ( string Data, byte Key ) : Stream

Encrypts the specified data using a 128-bit cipher. The key can be any length.

Encrypt128StreamSecure ( System Data, byte Key ) : Stream

Encrypts the specified data using a 128-bit cipher. The key can be any length.

Encrypt192Base64 ( Stream Data, byte Key ) : string

Encrypts the specified data using a 192-bit cipher. The key can be any length.

Encrypt192Base64 ( byte Data, byte Key ) : string

Encrypts the specified data using a 192-bit cipher. The key can be any length.

Encrypt192Base64 ( string Data, byte Key ) : string

Encrypts the specified data using a 192-bit cipher. The key can be any length.

Encrypt192Base64Secure ( System Data, byte Key ) : string

Encrypts the specified data using a 192-bit cipher. The key can be any length.

Encrypt192Byte ( Stream Data, byte Key ) : byte[]

Encrypts the specified data using a 192-bit cipher. The key can be any length.

Encrypt192Byte ( byte Data, byte Key ) : byte[]

Encrypts the specified data using a 192-bit cipher. The key can be any length.

Encrypt192Byte ( string Data, byte Key ) : byte[]

Encrypts the specified data using a 192-bit cipher. The key can be any length.

Encrypt192ByteSecure ( System Data, byte Key ) : byte[]

Encrypts the specified data using a 192-bit cipher. The key can be any length.

Encrypt192Stream ( Stream Data, byte Key ) : Stream

Encrypts the specified data using a 192-bit cipher. The key can be any length.

Encrypt192Stream ( byte Data, byte Key ) : Stream

Encrypts the specified data using a 192-bit cipher. The key can be any length.

Encrypt192Stream ( string Data, byte Key ) : Stream

Encrypts the specified data using a 192-bit cipher. The key can be any length.

Encrypt192StreamSecure ( System Data, byte Key ) : Stream

Encrypts the specified data using a 192-bit cipher. The key can be any length.

Encrypt256Base64 ( Stream Data, byte Key ) : string

Encrypts the specified data using a 256-bit cipher. The key can be any length.

Encrypt256Base64 ( byte Data, byte Key ) : string

Encrypts the specified data using a 256-bit cipher. The key can be any length.

Encrypt256Base64 ( string Data, byte Key ) : string

Encrypts the specified data using a 256-bit cipher. The key can be any length.

Encrypt256Base64Secure ( System Data, byte Key ) : string

Encrypts the specified data using a 256-bit cipher. The key can be any length.

Encrypt256Byte ( Stream Data, byte Key ) : byte[]

Encrypts the specified data using a 256-bit cipher. The key can be any length.

Encrypt256Byte ( byte Data, byte Key ) : byte[]

Encrypts the specified data using a 256-bit cipher. The key can be any length.

Encrypt256Byte ( string Data, byte Key ) : byte[]

Encrypts the specified data using a 256-bit cipher. The key can be any length.

Encrypt256ByteSecure ( System Data, byte Key ) : byte[]

Encrypts the specified data using a 256-bit cipher. The key can be any length.

Encrypt256Stream ( Stream Data, byte Key ) : Stream

Encrypts the specified data using a 256-bit cipher. The key can be any length.

Encrypt256Stream ( byte Data, byte Key ) : Stream

Encrypts the specified data using a 256-bit cipher. The key can be any length.

Encrypt256Stream ( string Data, byte Key ) : Stream

Encrypts the specified data using a 256-bit cipher. The key can be any length.

Encrypt256StreamSecure ( System Data, byte Key ) : Stream

Encrypts the specified data using a 256-bit cipher. The key can be any length.

Private Methods

Method Description
GenerateKeyIV128 ( byte Key ) : KeyData
GenerateKeyIV192 ( byte Key ) : KeyData
GenerateKeyIV256 ( byte Key ) : KeyData

Method Details

ConvertToUnsecureString() public static method

public static ConvertToUnsecureString ( System securePassword ) : string
securePassword System
return string

Decrypt128Byte() public static method

Decrypts the specified data using a 128-bit cipher. The key can be any length.
public static Decrypt128Byte ( Stream Data, byte Key ) : byte[]
Data Stream The data to be decrypted.
Key byte The key used to decrypt the data.
return byte[]

Decrypt128Byte() public static method

Decrypts the specified data using a 128-bit cipher. The key can be any length.
public static Decrypt128Byte ( byte Data, byte Key ) : byte[]
Data byte The data to be decrypted.
Key byte The key used to decrypt the data.
return byte[]

Decrypt128Stream() public static method

Decrypts the specified data using a 128-bit cipher. The key can be any length.
public static Decrypt128Stream ( Stream Data, byte Key ) : Stream
Data Stream The data to be decrypted.
Key byte The key used to decrypt the data.
return Stream

Decrypt128Stream() public static method

Decrypts the specified data using a 128-bit cipher. The key can be any length.
public static Decrypt128Stream ( byte Data, byte Key ) : Stream
Data byte The data to be decrypted.
Key byte The key used to decrypt the data.
return Stream

Decrypt128String() public static method

Decrypts the specified data using a 128-bit cipher. The key can be any length.
public static Decrypt128String ( Stream Data, byte Key ) : string
Data Stream The data to be decrypted.
Key byte The key used to decrypt the data.
return string

Decrypt128String() public static method

Decrypts the specified data using a 128-bit cipher. The key can be any length.
public static Decrypt128String ( byte Data, byte Key ) : string
Data byte The data to be decrypted.
Key byte The key used to decrypt the data.
return string

Decrypt128StringSecure() public static method

Decrypts the specified data using a 128-bit cipher. The key can be any length.
public static Decrypt128StringSecure ( Stream Data, byte Key ) : System.Security.SecureString
Data Stream The data to be decrypted. Will be converted to UTF8.
Key byte The key used to decrypt the data.
return System.Security.SecureString

Decrypt128StringSecure() public static method

Decrypts the specified data using a 128-bit cipher. The key can be any length.
public static Decrypt128StringSecure ( byte Data, byte Key ) : System.Security.SecureString
Data byte The data to be decrypted. Will be converted to UTF8.
Key byte The key used to decrypt the data.
return System.Security.SecureString

Decrypt192Byte() public static method

Decrypts the specified data using a 192-bit cipher. The key can be any length.
public static Decrypt192Byte ( Stream Data, byte Key ) : byte[]
Data Stream The data to be decrypted.
Key byte The key used to decrypt the data.
return byte[]

Decrypt192Byte() public static method

Decrypts the specified data using a 192-bit cipher. The key can be any length.
public static Decrypt192Byte ( byte Data, byte Key ) : byte[]
Data byte The data to be decrypted.
Key byte The key used to decrypt the data.
return byte[]

Decrypt192Stream() public static method

Decrypts the specified data using a 192-bit cipher. The key can be any length.
public static Decrypt192Stream ( Stream Data, byte Key ) : Stream
Data Stream The data to be decrypted.
Key byte The key used to decrypt the data.
return Stream

Decrypt192Stream() public static method

Decrypts the specified data using a 192-bit cipher. The key can be any length.
public static Decrypt192Stream ( byte Data, byte Key ) : Stream
Data byte The data to be decrypted.
Key byte The key used to decrypt the data.
return Stream

Decrypt192String() public static method

Decrypts the specified data using a 192-bit cipher. The key can be any length.
public static Decrypt192String ( Stream Data, byte Key ) : string
Data Stream The data to be decrypted.
Key byte The key used to decrypt the data.
return string

Decrypt192String() public static method

Decrypts the specified data using a 192-bit cipher. The key can be any length.
public static Decrypt192String ( byte Data, byte Key ) : string
Data byte The data to be decrypted.
Key byte The key used to decrypt the data.
return string

Decrypt192StringSecure() public static method

Decrypts the specified data using a 192-bit cipher. The key can be any length.
public static Decrypt192StringSecure ( Stream Data, byte Key ) : System.Security.SecureString
Data Stream The data to be decrypted. Will be converted to UTF8.
Key byte The key used to decrypt the data.
return System.Security.SecureString

Decrypt192StringSecure() public static method

Decrypts the specified data using a 192-bit cipher. The key can be any length.
public static Decrypt192StringSecure ( byte Data, byte Key ) : System.Security.SecureString
Data byte The data to be decrypted. Will be converted to UTF8.
Key byte The key used to decrypt the data.
return System.Security.SecureString

Decrypt256Byte() public static method

Decrypts the specified data using a 256-bit cipher. The key can be any length.
public static Decrypt256Byte ( Stream Data, byte Key ) : byte[]
Data Stream The data to be decrypted.
Key byte The key used to decrypt the data.
return byte[]

Decrypt256Byte() public static method

Decrypts the specified data using a 256-bit cipher. The key can be any length.
public static Decrypt256Byte ( byte Data, byte Key ) : byte[]
Data byte The data to be decrypted.
Key byte The key used to decrypt the data.
return byte[]

Decrypt256Stream() public static method

Decrypts the specified data using a 256-bit cipher. The key can be any length.
public static Decrypt256Stream ( Stream Data, byte Key ) : Stream
Data Stream The data to be decrypted.
Key byte The key used to decrypt the data.
return Stream

Decrypt256Stream() public static method

Decrypts the specified data using a 256-bit cipher. The key can be any length.
public static Decrypt256Stream ( byte Data, byte Key ) : Stream
Data byte The data to be decrypted.
Key byte The key used to decrypt the data.
return Stream

Decrypt256String() public static method

Decrypts the specified data using a 256-bit cipher. The key can be any length.
public static Decrypt256String ( Stream Data, byte Key ) : string
Data Stream The data to be decrypted.
Key byte The key used to decrypt the data.
return string

Decrypt256String() public static method

Decrypts the specified data using a 256-bit cipher. The key can be any length.
public static Decrypt256String ( byte Data, byte Key ) : string
Data byte The data to be decrypted.
Key byte The key used to decrypt the data.
return string

Decrypt256StringSecure() public static method

Decrypts the specified data using a 256-bit cipher. The key can be any length.
public static Decrypt256StringSecure ( Stream Data, byte Key ) : System.Security.SecureString
Data Stream The data to be decrypted. Will be converted to UTF8.
Key byte The key used to decrypt the data.
return System.Security.SecureString

Decrypt256StringSecure() public static method

Decrypts the specified data using a 256-bit cipher. The key can be any length.
public static Decrypt256StringSecure ( byte Data, byte Key ) : System.Security.SecureString
Data byte The data to be decrypted. Will be converted to UTF8.
Key byte The key used to decrypt the data.
return System.Security.SecureString

Encrypt128Base64() public static method

Encrypts the specified data using a 128-bit cipher. The key can be any length.
public static Encrypt128Base64 ( Stream Data, byte Key ) : string
Data Stream The data to be encrypted.
Key byte The key used to encrypt the data.
return string

Encrypt128Base64() public static method

Encrypts the specified data using a 128-bit cipher. The key can be any length.
public static Encrypt128Base64 ( byte Data, byte Key ) : string
Data byte The data to be encrypted.
Key byte The key used to encrypt the data.
return string

Encrypt128Base64() public static method

Encrypts the specified data using a 128-bit cipher. The key can be any length.
public static Encrypt128Base64 ( string Data, byte Key ) : string
Data string The data to be encrypted.
Key byte The key used to encrypt the data.
return string

Encrypt128Base64Secure() public static method

Encrypts the specified data using a 128-bit cipher. The key can be any length.
public static Encrypt128Base64Secure ( System Data, byte Key ) : string
Data System The data to be encrypted. Must be UTF8.
Key byte The key used to encrypt the data.
return string

Encrypt128Byte() public static method

Encrypts the specified data using a 128-bit cipher. The key can be any length.
public static Encrypt128Byte ( Stream Data, byte Key ) : byte[]
Data Stream The data to be encrypted.
Key byte The key used to encrypt the data.
return byte[]

Encrypt128Byte() public static method

Encrypts the specified data using a 128-bit cipher. The key can be any length.
public static Encrypt128Byte ( byte Data, byte Key ) : byte[]
Data byte The data to be encrypted.
Key byte The key used to encrypt the data.
return byte[]

Encrypt128Byte() public static method

Encrypts the specified data using a 128-bit cipher. The key can be any length.
public static Encrypt128Byte ( string Data, byte Key ) : byte[]
Data string The data to be encrypted.
Key byte The key used to encrypt the data.
return byte[]

Encrypt128ByteSecure() public static method

Encrypts the specified data using a 128-bit cipher. The key can be any length.
public static Encrypt128ByteSecure ( System Data, byte Key ) : byte[]
Data System The data to be encrypted. Must be UTF8.
Key byte The key used to encrypt the data.
return byte[]

Encrypt128Stream() public static method

Encrypts the specified data using a 128-bit cipher. The key can be any length.
public static Encrypt128Stream ( Stream Data, byte Key ) : Stream
Data Stream The data to be encrypted.
Key byte The key used to encrypt the data.
return Stream

Encrypt128Stream() public static method

Encrypts the specified data using a 128-bit cipher. The key can be any length.
public static Encrypt128Stream ( byte Data, byte Key ) : Stream
Data byte The data to be encrypted.
Key byte The key used to encrypt the data.
return Stream

Encrypt128Stream() public static method

Encrypts the specified data using a 128-bit cipher. The key can be any length.
public static Encrypt128Stream ( string Data, byte Key ) : Stream
Data string The data to be encrypted.
Key byte The key used to encrypt the data.
return Stream

Encrypt128StreamSecure() public static method

Encrypts the specified data using a 128-bit cipher. The key can be any length.
public static Encrypt128StreamSecure ( System Data, byte Key ) : Stream
Data System The data to be encrypted. Must be UTF8.
Key byte The key used to encrypt the data.
return Stream

Encrypt192Base64() public static method

Encrypts the specified data using a 192-bit cipher. The key can be any length.
public static Encrypt192Base64 ( Stream Data, byte Key ) : string
Data Stream The data to be encrypted.
Key byte The key used to encrypt the data.
return string

Encrypt192Base64() public static method

Encrypts the specified data using a 192-bit cipher. The key can be any length.
public static Encrypt192Base64 ( byte Data, byte Key ) : string
Data byte The data to be encrypted.
Key byte The key used to encrypt the data.
return string

Encrypt192Base64() public static method

Encrypts the specified data using a 192-bit cipher. The key can be any length.
public static Encrypt192Base64 ( string Data, byte Key ) : string
Data string The data to be encrypted.
Key byte The key used to encrypt the data.
return string

Encrypt192Base64Secure() public static method

Encrypts the specified data using a 192-bit cipher. The key can be any length.
public static Encrypt192Base64Secure ( System Data, byte Key ) : string
Data System The data to be encrypted. Must be UTF8.
Key byte The key used to encrypt the data.
return string

Encrypt192Byte() public static method

Encrypts the specified data using a 192-bit cipher. The key can be any length.
public static Encrypt192Byte ( Stream Data, byte Key ) : byte[]
Data Stream The data to be encrypted.
Key byte The key used to encrypt the data.
return byte[]

Encrypt192Byte() public static method

Encrypts the specified data using a 192-bit cipher. The key can be any length.
public static Encrypt192Byte ( byte Data, byte Key ) : byte[]
Data byte The data to be encrypted.
Key byte The key used to encrypt the data.
return byte[]

Encrypt192Byte() public static method

Encrypts the specified data using a 192-bit cipher. The key can be any length.
public static Encrypt192Byte ( string Data, byte Key ) : byte[]
Data string The data to be encrypted.
Key byte The key used to encrypt the data.
return byte[]

Encrypt192ByteSecure() public static method

Encrypts the specified data using a 192-bit cipher. The key can be any length.
public static Encrypt192ByteSecure ( System Data, byte Key ) : byte[]
Data System The data to be encrypted. Must be UTF8.
Key byte The key used to encrypt the data.
return byte[]

Encrypt192Stream() public static method

Encrypts the specified data using a 192-bit cipher. The key can be any length.
public static Encrypt192Stream ( Stream Data, byte Key ) : Stream
Data Stream The data to be encrypted.
Key byte The key used to encrypt the data.
return Stream

Encrypt192Stream() public static method

Encrypts the specified data using a 192-bit cipher. The key can be any length.
public static Encrypt192Stream ( byte Data, byte Key ) : Stream
Data byte The data to be encrypted.
Key byte The key used to encrypt the data.
return Stream

Encrypt192Stream() public static method

Encrypts the specified data using a 192-bit cipher. The key can be any length.
public static Encrypt192Stream ( string Data, byte Key ) : Stream
Data string The data to be encrypted.
Key byte The key used to encrypt the data.
return Stream

Encrypt192StreamSecure() public static method

Encrypts the specified data using a 192-bit cipher. The key can be any length.
public static Encrypt192StreamSecure ( System Data, byte Key ) : Stream
Data System The data to be encrypted. Must be UTF8.
Key byte The key used to encrypt the data.
return Stream

Encrypt256Base64() public static method

Encrypts the specified data using a 256-bit cipher. The key can be any length.
public static Encrypt256Base64 ( Stream Data, byte Key ) : string
Data Stream The data to be encrypted.
Key byte The key used to encrypt the data.
return string

Encrypt256Base64() public static method

Encrypts the specified data using a 256-bit cipher. The key can be any length.
public static Encrypt256Base64 ( byte Data, byte Key ) : string
Data byte The data to be encrypted.
Key byte The key used to encrypt the data.
return string

Encrypt256Base64() public static method

Encrypts the specified data using a 256-bit cipher. The key can be any length.
public static Encrypt256Base64 ( string Data, byte Key ) : string
Data string The data to be encrypted.
Key byte The key used to encrypt the data.
return string

Encrypt256Base64Secure() public static method

Encrypts the specified data using a 256-bit cipher. The key can be any length.
public static Encrypt256Base64Secure ( System Data, byte Key ) : string
Data System The data to be encrypted. Must be UTF8.
Key byte The key used to encrypt the data.
return string

Encrypt256Byte() public static method

Encrypts the specified data using a 256-bit cipher. The key can be any length.
public static Encrypt256Byte ( Stream Data, byte Key ) : byte[]
Data Stream The data to be encrypted.
Key byte The key used to encrypt the data.
return byte[]

Encrypt256Byte() public static method

Encrypts the specified data using a 256-bit cipher. The key can be any length.
public static Encrypt256Byte ( byte Data, byte Key ) : byte[]
Data byte The data to be encrypted.
Key byte The key used to encrypt the data.
return byte[]

Encrypt256Byte() public static method

Encrypts the specified data using a 256-bit cipher. The key can be any length.
public static Encrypt256Byte ( string Data, byte Key ) : byte[]
Data string The data to be encrypted.
Key byte The key used to encrypt the data.
return byte[]

Encrypt256ByteSecure() public static method

Encrypts the specified data using a 256-bit cipher. The key can be any length.
public static Encrypt256ByteSecure ( System Data, byte Key ) : byte[]
Data System The data to be encrypted. Must be UTF8.
Key byte The key used to encrypt the data.
return byte[]

Encrypt256Stream() public static method

Encrypts the specified data using a 256-bit cipher. The key can be any length.
public static Encrypt256Stream ( Stream Data, byte Key ) : Stream
Data Stream The data to be encrypted.
Key byte The key used to encrypt the data.
return Stream

Encrypt256Stream() public static method

Encrypts the specified data using a 256-bit cipher. The key can be any length.
public static Encrypt256Stream ( byte Data, byte Key ) : Stream
Data byte The data to be encrypted.
Key byte The key used to encrypt the data.
return Stream

Encrypt256Stream() public static method

Encrypts the specified data using a 256-bit cipher. The key can be any length.
public static Encrypt256Stream ( string Data, byte Key ) : Stream
Data string The data to be encrypted.
Key byte The key used to encrypt the data.
return Stream

Encrypt256StreamSecure() public static method

Encrypts the specified data using a 256-bit cipher. The key can be any length.
public static Encrypt256StreamSecure ( System Data, byte Key ) : Stream
Data System The data to be encrypted. Must be UTF8.
Key byte The key used to encrypt the data.
return Stream