KeyVaultCryptoProviderEncryptAsync Method

Encrypts data using a key stored in the IKeyProvider

Definition

Namespace: InnerDrive.Azure
Assembly: InnerDrive.Azure (in InnerDrive.Azure.dll) Version: 5.2.9017.0
C#
public Task<byte[]> EncryptAsync(
	string keyName,
	byte[] data,
	EncryptionAlgorithm algorithm = default
)

Parameters

keyName  String
The unique identifier for the key
data  Byte
The plaintext to encrypt
algorithm  EncryptionAlgorithm  (Optional)
The EncryptionAlgorithm to use

Return Value

TaskByte
The ciphertext

Implements

ICryptoProviderEncryptAsync(String, Byte, EncryptionAlgorithm)

Remarks

The default encryption algorithm is RsaOaep256. For more information, see the Microsoft documentation

See Also