Share via


AesCryptoServiceProvider Class

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Performs symmetric encryption and decryption using the Cryptographic Application Programming Interfaces (CAPI) implementation of the Advanced Encryption Standard (AES) algorithm.

Inheritance Hierarchy

System. . :: . .Object
  Microsoft.SPOT.Cryptoki. . :: . .SessionContainer
    System.Security.Cryptography. . :: . .SymmetricAlgorithm
      System.Security.Cryptography..::..AesCryptoServiceProvider

Namespace:  System.Security.Cryptography
Assembly:  System.Security (in System.Security.dll)

Syntax

'Declaration
Public NotInheritable Class AesCryptoServiceProvider _
    Inherits SymmetricAlgorithm
public sealed class AesCryptoServiceProvider : SymmetricAlgorithm
public ref class AesCryptoServiceProvider sealed : public SymmetricAlgorithm
[<Sealed>]
type AesCryptoServiceProvider =  
    class
        inherit SymmetricAlgorithm
    end
public final class AesCryptoServiceProvider extends SymmetricAlgorithm

The AesCryptoServiceProvider type exposes the following members.

Constructors

  Name Description
Public method AesCryptoServiceProvider(CryptoKey) Initializes a new instance of the AesCryptoServiceProvider class with the specified key.
Public method AesCryptoServiceProvider(Int32) Initializes a new instance of the AesCryptoServiceProvider class with the specified key size.
Public method AesCryptoServiceProvider(Session, Int32) Initializes a new instance of the AesCryptoServiceProvider class with the specified session context and key size.
Public method AesCryptoServiceProvider(String, Int32) Initializes a new instance of the AesCryptoServiceProvider class with the specified service provider and key size.

Top

Properties

  Name Description
Public property BlockSize Gets or sets the block size, in bits, of the cryptographic operation. (Inherited from SymmetricAlgorithm.)
Public property FeedbackSize Gets or sets the feedback size, in bits, of the cryptographic operation. (Inherited from SymmetricAlgorithm.)
Public property IsDisposed (Inherited from SessionContainer.)
Public property IV Gets or sets the initialization vector (IV) for the symmetric algorithm. (Inherited from SymmetricAlgorithm.)
Public property Key Gets or sets the secret key for the symmetric algorithm. (Inherited from SymmetricAlgorithm.)
Public property KeySize Gets or sets the size, in bits, of the secret key used by the symmetric algorithm. (Inherited from SymmetricAlgorithm.)
Public property LegalBlockSizes Gets the block sizes, in bits, that are supported by the symmetric algorithm. (Inherited from SymmetricAlgorithm.)
Public property LegalKeySizes Gets the key sizes, in bits, that are supported by the symmetric algorithm. (Inherited from SymmetricAlgorithm.)
Public property Mode Gets or sets the mode for operation of the symmetric algorithm. (Inherited from SymmetricAlgorithm.)
Public property Padding Gets or sets the padding mode used in the symmetric algorithm. (Inherited from SymmetricAlgorithm.)
Public property Session (Inherited from SessionContainer.)

Top

Methods

  Name Description
Public method Clear Releases all resources used by the SymmetricAlgorithm class. (Inherited from SymmetricAlgorithm.)
Public method CreateDecryptor() () () () Creates a symmetric decryptor object with the current Key property and initialization vector (IV). (Inherited from SymmetricAlgorithm.)
Public method CreateDecryptor(CryptoKey, array<Byte> [] () [] []) Creates a symmetric AES decryptor object using the specified key and initialization vector (IV). (Overrides SymmetricAlgorithm. . :: . .CreateDecryptor(CryptoKey, array<Byte> [] () [] []).)
Public method CreateEncryptor() () () () Creates a symmetric encryptor object with the current Key property and initialization vector (IV). (Inherited from SymmetricAlgorithm.)
Public method CreateEncryptor(CryptoKey, array<Byte> [] () [] []) Creates a symmetric AES encryptor object using the specified key and initialization vector (IV). (Overrides SymmetricAlgorithm. . :: . .CreateEncryptor(CryptoKey, array<Byte> [] () [] []).)
Public method Dispose() () () () (Inherited from SessionContainer.)
Public method Equals(Object) Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Public method GenerateIV Generates a random initialization vector (IV) to use for the algorithm. (Overrides SymmetricAlgorithm. . :: . .GenerateIV() () () ().)
Public method GenerateKey Generates a random key to use for the algorithm. (Overrides SymmetricAlgorithm. . :: . .GenerateKey() () () ().)
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
Public method ValidKeySize Determines whether the specified key size is valid for the current algorithm. (Inherited from SymmetricAlgorithm.)

Top

Fields

  Name Description
Public fieldStatic member DefaultKeySize The default size, in bits, of the secret key used by the symmetric algorithm.

Top

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.

See Also

Reference

System.Security.Cryptography Namespace