Namespace: System.Security.Cryptography
SymmetricAlgorithm
Represents the abstract base class from which all implementations of symmetric algorithms must inherit.
Properties (6)
CipherMode Mode
Gets or sets the mode for operation of the symmetric algorithm.
Value: The mode for operation of the symmetric algorithm. The default is CBC.
int KeySize
Gets or sets the size, in bits, of the secret key used by the symmetric algorithm.
Value: The size, in bits, of the secret key used by the symmetric algorithm.
int BlockSize
Gets or sets the block size, in bits, of the cryptographic operation.
Value: The block size, in bits.
PaddingMode Padding
Gets or sets the padding mode used in the symmetric algorithm.
Value: The padding mode used in the symmetric algorithm. The default is PKCS7.
byte[] Key
Gets or sets the secret key for the symmetric algorithm.
Value: The secret key to use for the symmetric algorithm.
byte[] IV
Gets or sets the initialization vector (IV) for the symmetric algorithm.
Value: The initialization vector.
Methods (2)
ICryptoTransform CreateEncryptor
Creates a symmetric encryptor object with the current Key property and initialization vector (IV).
Returns: A symmetric encryptor object.
ICryptoTransform CreateDecryptor
Creates a symmetric decryptor object with the current Key property and initialization vector (IV).
Returns: A symmetric decryptor object.