C# Class Brunet.Security.SymmetricEncryption

This wraps SymmetricAlgorithm to be better supported for lossy communication. This class is not thread-safe.
Show file Open project: johnynek/brunet Class Usage Examples

Public Properties

Property Type Description
BlockSizeByte int

Public Methods

Method Description
Clear ( ) : void

When we're done using this, it is safest to clear all security bits from memory. That's what this does.

DecryptData ( byte EncryptedData ) : byte[]

Takes in a byte array and returns the data in a unencrypted format.

EncryptData ( byte UnencryptedData ) : byte[]

Takes in an unencrypted byte array and returns the encrypted form.

SymmetricEncryption ( SymmetricAlgorithm Algorithm ) : Brunet

Creates a new SymmetricEncryption handler for the passed in SymmetricAlgorithm.

Method Details

Clear() public method

When we're done using this, it is safest to clear all security bits from memory. That's what this does.
public Clear ( ) : void
return void

DecryptData() public method

Takes in a byte array and returns the data in a unencrypted format.
public DecryptData ( byte EncryptedData ) : byte[]
EncryptedData byte The data to decrypt.
return byte[]

EncryptData() public method

Takes in an unencrypted byte array and returns the encrypted form.
public EncryptData ( byte UnencryptedData ) : byte[]
UnencryptedData byte The byte array to encrypt.
return byte[]

SymmetricEncryption() public method

Creates a new SymmetricEncryption handler for the passed in SymmetricAlgorithm.
public SymmetricEncryption ( SymmetricAlgorithm Algorithm ) : Brunet
Algorithm System.Security.Cryptography.SymmetricAlgorithm
return Brunet

Property Details

BlockSizeByte public property

public int BlockSizeByte
return int