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.]
Creates a symmetric encryptor object with the current Key property and initialization vector (IV).
Namespace: System.Security.Cryptography
Assembly: System.Security (in System.Security.dll)
Syntax
'Declaration
Public Overridable Function CreateEncryptor As ICryptoTransform
public virtual ICryptoTransform CreateEncryptor()
public:
virtual ICryptoTransform^ CreateEncryptor()
abstract CreateEncryptor : unit -> ICryptoTransform
override CreateEncryptor : unit -> ICryptoTransform
public function CreateEncryptor() : ICryptoTransform
Return Value
Type: System.Security.Cryptography. . :: . .ICryptoTransform
A symmetric encryptor object.
Remarks
If the current Key property is null Nothing nullptr unit a null reference (Nothing in Visual Basic) , the GenerateKey method is called to create a new random Key. If the current IV property is null Nothing nullptr unit a null reference (Nothing in Visual Basic) , the GenerateIV method is called to create a new random IV.
Use the CreateDecryptor overload with the same signature to decrypt the result of this method.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see dd66cd4c-b087-415f-9c3e-94e3a1835f74.