From 557f72b5647d4a2c64b3fba9af0312fa47475703 Mon Sep 17 00:00:00 2001 From: Dinuka Amarasinghe Date: Sat, 11 May 2024 11:48:49 +0530 Subject: [PATCH] Change PgpEncryptionOptions to Options --- ballerina/encrypt_decrypt.bal | 2 +- ballerina/pgp_utils.bal | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ballerina/encrypt_decrypt.bal b/ballerina/encrypt_decrypt.bal index 4b516c5b..0002f4ff 100644 --- a/ballerina/encrypt_decrypt.bal +++ b/ballerina/encrypt_decrypt.bal @@ -254,7 +254,7 @@ public isolated function decryptAesGcm(byte[] input, byte[] key, byte[] iv, AesP # + publicKeyPath - Path to the public key # + options - PGP encryption options # + return - Encrypted data or else a `crypto:Error` if the key is invalid -public isolated function encryptPgp(byte[] plainText, string publicKeyPath, *PgpEncryptionOptions options) +public isolated function encryptPgp(byte[] plainText, string publicKeyPath, *Options options) returns byte[]|Error = @java:Method { name: "encryptPgp", 'class: "io.ballerina.stdlib.crypto.nativeimpl.Encrypt" diff --git a/ballerina/pgp_utils.bal b/ballerina/pgp_utils.bal index 9ff156a0..a60d3518 100644 --- a/ballerina/pgp_utils.bal +++ b/ballerina/pgp_utils.bal @@ -20,7 +20,7 @@ # + symmetricKeyAlgorithm - Specifies the symmetric key algorithm used for encryption # + armor - Indicates whether ASCII armor is enabled for the encrypted output # + withIntegrityCheck - Indicates whether integrity check is included in the encryption -public type PgpEncryptionOptions record {| +public type Options record {| CompressionAlgorithmTags compressionAlgorithm = ZIP; SymmetricKeyAlgorithmTags symmetricKeyAlgorithm = AES_256; boolean armor = true;