Share via


SymmetricKey.Encrypt Method

Encrypts data by using the symmetric key.

Namespace: Microsoft.Clm
Assembly: Microsoft.Clm.Common (in Microsoft.Clm.Common.dll)

Usage

'Usage
Dim instance As SymmetricKey
Dim data As Byte()
Dim iv As Byte()
Dim returnValue As Byte()

returnValue = instance.Encrypt(data, iv)

Syntax

'Declaration
Public MustOverride Function Encrypt ( _
    data As Byte(), _
    iv As Byte() _
) As Byte()
public abstract byte[] Encrypt (
    byte[] data,
    byte[] iv
)
public:
virtual array<unsigned char>^ Encrypt (
    array<unsigned char>^ data, 
    array<unsigned char>^ iv
) abstract
public abstract byte[] Encrypt (
    byte[] data, 
    byte[] iv
)
public abstract function Encrypt (
    data : byte[], 
    iv : byte[]
) : byte[]

Parameters

  • data
    An array of bytes that contains the 8-byte aligned plaintext data that is to be encrypted.
  • iv
    An array of bytes that contains the initialization vector (IV). This parameter can be null.

Return Value

An array of bytes that contains the plaintext encrypted data.

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.

Platforms

Development Platforms

Windows 2008 x64 Edition

Target Platforms

Windows XP SP3, Windows Vista SP1+, Windows 7, Windows Server 2008, Windows Server 2008 R2

See Also

Reference

SymmetricKey Class
SymmetricKey Members
Microsoft.Clm Namespace