Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Represents the abstract base class from which all implementations of symmetric algorithms must inherit.
Inheritance Hierarchy
System. . :: . .Object
Microsoft.SPOT.Cryptoki. . :: . .SessionContainer
System.Security.Cryptography..::..SymmetricAlgorithm
System.Security.Cryptography. . :: . .AesCryptoServiceProvider
System.Security.Cryptography. . :: . .TripleDESCryptoServiceProvider
Namespace: System.Security.Cryptography
Assembly: System.Security (in System.Security.dll)
Syntax
'Declaration
Public MustInherit Class SymmetricAlgorithm _
Inherits SessionContainer
public abstract class SymmetricAlgorithm : SessionContainer
public ref class SymmetricAlgorithm abstract : public SessionContainer
[<AbstractClass>]
type SymmetricAlgorithm =
class
inherit SessionContainer
end
public abstract class SymmetricAlgorithm extends SessionContainer
The SymmetricAlgorithm type exposes the following members.
Constructors
Name | Description | |
---|---|---|
![]() |
SymmetricAlgorithm | Initializes a new instance of the SymmetricAlgorithm class. |
Top
Properties
Name | Description | |
---|---|---|
![]() |
BlockSize | Gets or sets the block size, in bits, of the cryptographic operation. |
![]() |
FeedbackSize | Gets or sets the feedback size, in bits, of the cryptographic operation. |
![]() |
IsDisposed | (Inherited from SessionContainer.) |
![]() |
IV | Gets or sets the initialization vector (IV) for the symmetric algorithm. |
![]() |
Key | Gets or sets the secret key for the symmetric algorithm. |
![]() |
KeySize | Gets or sets the size, in bits, of the secret key used by the symmetric algorithm. |
![]() |
LegalBlockSizes | Gets the block sizes, in bits, that are supported by the symmetric algorithm. |
![]() |
LegalKeySizes | Gets the key sizes, in bits, that are supported by the symmetric algorithm. |
![]() |
MechanismType | Gets the symmetric algorithm type. |
![]() |
Mode | Gets or sets the mode for operation of the symmetric algorithm. |
![]() |
Padding | Gets or sets the padding mode used in the symmetric algorithm. |
![]() |
Session | (Inherited from SessionContainer.) |
Top
Methods
Name | Description | |
---|---|---|
![]() |
Clear | Releases all resources used by the SymmetricAlgorithm class. |
![]() |
CreateDecryptor() () () () | Creates a symmetric decryptor object with the current Key property and initialization vector (IV). |
![]() |
CreateDecryptor(CryptoKey, array<Byte> [] () [] []) | When overridden in a derived class, creates a symmetric decryptor object with the specified Key property and initialization vector (IV). |
![]() |
CreateEncryptor() () () () | Creates a symmetric encryptor object with the current Key property and initialization vector (IV). |
![]() |
CreateEncryptor(CryptoKey, array<Byte> [] () [] []) | When overridden in a derived class, creates a symmetric encryptor object with the specified Key property and initialization vector (IV). |
![]() |
Dispose() () () () | (Inherited from SessionContainer.) |
![]() |
Dispose(Boolean) | Releases the unmanaged resources used by the SymmetricAlgorithm and optionally releases the managed resources. (Overrides SessionContainer. . :: . .Dispose(Boolean).) |
![]() |
Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
![]() |
Finalize | (Inherited from SessionContainer.) |
![]() |
GenerateIV | When overridden in a derived class, generates a random initialization vector (IV) to use for the algorithm. |
![]() |
GenerateKey | When overridden in a derived class, generates a random key (Key) to use for the algorithm. |
![]() |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() |
GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
![]() |
ValidKeySize | Determines whether the specified key size is valid for the current algorithm. |
Top
Fields
Name | Description | |
---|---|---|
![]() |
BlockSizeValue | Represents the block size, in bits, of the cryptographic operation. |
![]() |
FeedbackSizeValue | Represents the feedback size, in bits, of the cryptographic operation. |
![]() |
IVValue | Represents the initialization vector (IV) for the symmetric algorithm. |
![]() |
KeySizeValue | Represents the size, in bits, of the secret key used by the symmetric algorithm. |
![]() |
KeyValue | Represents the secret key for the symmetric algorithm. |
![]() |
LegalBlockSizesValue | Specifies the block sizes, in bits, that are supported by the symmetric algorithm. |
![]() |
LegalKeySizesValue | Specifies the key sizes, in bits, that are supported by the symmetric algorithm. |
![]() |
m_isDisposed | (Inherited from SessionContainer.) |
![]() |
m_isSessionClosing | (Inherited from SessionContainer.) |
![]() |
m_ownsSession | (Inherited from SessionContainer.) |
![]() |
m_session | (Inherited from SessionContainer.) |
![]() |
ModeValue | Represents the cipher mode used in the symmetric algorithm. |
![]() |
OwnsKey | Represents the value that indicates whether the algorithm object owns the key. |
![]() |
PaddingValue | Represents the padding mode used in the symmetric algorithm. |
Top
Remarks
The classes that derive from the SymmetricAlgorithm class use a chaining mode called cipher block chaining (CBC), which requires a key (Key) and an initialization vector (IV) to perform cryptographic transformations on data. To decrypt data that was encrypted using one of the SymmetricAlgorithm classes, you must set the Key property and the IV property to the same values that were used for encryption. For a symmetric algorithm to be useful, the secret key must be known only to the sender and the receiver.
All cryptographic classes in the .NET Framework that hold sensitive data implement a Clear method. When called, the Clear method overwrites all sensitive data within the object with zeros and then releases the object so that it can be safely garbage collected. When the object has been zeroed and released, you should then call the Dispose method with the disposing parameter set to True to dispose of all managed and unmanaged resources associated with the object.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.