public async Task <byte[]> DecryptAsync(byte[] ciphertextBlob, IDictionary <string, string> context = null) { var request = new DecryptRequest(keyId, ciphertextBlob, context != null ? new JsonObject(context) : null); var result = await client.DecryptAsync(request).ConfigureAwait(false); return(result.Plaintext); }
public async Task <byte[]> DecryptAsync( byte[] ciphertext, IEnumerable <KeyValuePair <string, string> >?aad = null) { var request = new DecryptRequest(keyId, ciphertext, GetEncryptionContext(aad)); var result = await client.DecryptAsync(request).ConfigureAwait(false); return(result.Plaintext); }
public Task <DecryptResponse> DecryptAsync(DecryptRequest request) { return(SendAsync <DecryptResponse>("Decrypt", request)); }
public Task <DecryptResponse> DecryptAsync(DecryptRequest request) => SendAsync <DecryptResponse>("Decrypt", request);