Skip to content

Commit

Permalink
Merge pull request #568 from ballerina-platform/rename-param
Browse files Browse the repository at this point in the history
[Update 11] Rename `publicKeyPath` and `privateKeyPath` parameters
  • Loading branch information
TharmiganK authored Oct 11, 2024
2 parents f2f7233 + 6ef4ba5 commit 2578a93
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions ballerina/Ballerina.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
org = "ballerina"
name = "crypto"
version = "2.7.2"
version = "2.7.3"
authors = ["Ballerina"]
keywords = ["security", "hash", "hmac", "sign", "encrypt", "decrypt", "private key", "public key"]
repository = "https://github.com/ballerina-platform/module-ballerina-crypto"
Expand All @@ -15,8 +15,8 @@ graalvmCompatible = true
[[platform.java17.dependency]]
groupId = "io.ballerina.stdlib"
artifactId = "crypto-native"
version = "2.7.2"
path = "../native/build/libs/crypto-native-2.7.2.jar"
version = "2.7.3"
path = "../native/build/libs/crypto-native-2.7.3-SNAPSHOT.jar"

[[platform.java17.dependency]]
groupId = "org.bouncycastle"
Expand Down
2 changes: 1 addition & 1 deletion ballerina/Dependencies.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ distribution-version = "2201.9.0"
[[package]]
org = "ballerina"
name = "crypto"
version = "2.7.2"
version = "2.7.3"
dependencies = [
{org = "ballerina", name = "jballerina.java"},
{org = "ballerina", name = "lang.array"},
Expand Down
8 changes: 4 additions & 4 deletions ballerina/encrypt_decrypt.bal
Original file line number Diff line number Diff line change
Expand Up @@ -251,10 +251,10 @@ public isolated function decryptAesGcm(byte[] input, byte[] key, byte[] iv, AesP
# ```
#
# + plainText - The content to be encrypted
# + publicKeyPath - Path to the public key
# + publicKey - 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, *Options options)
public isolated function encryptPgp(byte[] plainText, string publicKey, *Options options)
returns byte[]|Error = @java:Method {
name: "encryptPgp",
'class: "io.ballerina.stdlib.crypto.nativeimpl.Encrypt"
Expand All @@ -270,10 +270,10 @@ public isolated function encryptPgp(byte[] plainText, string publicKeyPath, *Opt
# ```
#
# + cipherText - The encrypted content to be decrypted
# + privateKeyPath - Path to the private key
# + privateKey - Path to the private key
# + passphrase - passphrase of the private key
# + return - Decrypted data or else a `crypto:Error` if the key or passphrase is invalid
public isolated function decryptPgp(byte[] cipherText, string privateKeyPath, byte[] passphrase)
public isolated function decryptPgp(byte[] cipherText, string privateKey, byte[] passphrase)
returns byte[]|Error = @java:Method {
name: "decryptPgp",
'class: "io.ballerina.stdlib.crypto.nativeimpl.Decrypt"
Expand Down

0 comments on commit 2578a93

Please sign in to comment.