KeyVaultClient.EncryptAsync Method (String, String, Byte[], CancellationToken)


Asynchronously encrypts a single block of data. The amount of data that may be encrypted is determined by the target key type and the encryption algorithm.

Namespace:   Microsoft.Azure.KeyVault
Assembly:  Microsoft.Azure.KeyVault (in Microsoft.Azure.KeyVault.dll)


public Task<KeyOperationResult> EncryptAsync(
    string keyIdentifier,
    string algorithm,
    byte[] plainText,
    CancellationToken cancellationToken = null
Task<KeyOperationResult^>^ EncryptAsync(
    String^ keyIdentifier,
    String^ algorithm,
    array<unsigned char>^ plainText,
    CancellationToken cancellationToken = null
member EncryptAsync : 
        keyIdentifier:string *
        algorithm:string *
        plainText:byte[] *
        cancellationToken:CancellationToken = null -> Task<KeyOperationResult>
Public Function EncryptAsync (
    keyIdentifier As String,
    algorithm As String,
    plainText As Byte(),
    cancellationToken As CancellationToken
) As Task(Of KeyOperationResult)


Return Value

Type: System.Threading.Tasks.Task<KeyOperationResult>

The encrypted text.

See Also

EncryptAsync Overload
KeyVaultClient Class
Microsoft.Azure.KeyVault Namespace

Return to top