SymmetricAlgorithmBase

SymmetricAlgorithmBase


Provides a common base of functionality for SymmetricAlgorithm derived classes.


Public:

Properties:

NameDescription
 BlockSize (get) Returns the currently set block size in bits.  
 BlockSize (let) Sets the current block size to be used.  
 FeedbackSize (get) Returns the current feedback size in bits.  
 FeedbackSize (let) Sets the current feedback size in bits to be used.  
 KeySize (get) Returns the currently set key size to be used.  
 KeySize (let) Sets the new key size value to be used.  
 LegalBlockSizes (get) Returns a list of legal block sizes.  
 LegalKeySizes (get) Returns a list of legal key sizes.  
 Mode (get) Returns the current cipher mode to be used.  
 Mode (let) Sets the cipher mode to be used.  
 Padding (get) Returns the current padding to be used.  
 Padding (let) Sets the padding mode to be used.  

Methods:

NameDescription
 AddLegalBlockSize Adds a new KeySizes object with the specified values to the list of legal block sizes.  
 AddLegalKeySize Adds a new KeySizes object with the supplied values to the list of legal key sizes.  
 Clear Clears the IV and Key values.  
 CloneRgbIV Returns a clone of an IV.  
 CloneRgbKey Returns a clone of a key.  
 GenerateIV Generates a random IV value.  
 GenerateKey Generates a new random key.  
 GetIV Returns the current IV value.  
 GetKey Returns the current secret key.  
 SetIV Sets the current IV value.  
 SetKey Sets the current secret key.  
 ValidKeySize Checks if a bit length is a valid key size in bits.  

Events:

NameDescription
 CheckForWeakKey Used for implementations that must check for some kind of weak or semi-weak key.  

Remarks

The base class implements many of the details necessary for implementing a Symmetric Cryptographic Algorithm. By utilizing the base class the implementor can quickly provide a new implementation that is consistent with the existing implementations without the need to manage lower level details.

See Also

Project CorLib Overview

Class SymmetricAlgorithmBase Overview

SymmetricAlgorithm