Skip to content

Commit

Permalink
Update method descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
hwupathum committed Mar 26, 2024
1 parent b5478fd commit 39080cd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
8 changes: 4 additions & 4 deletions ballerina/hpke.bal
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public type HybridEncryptionResult record {|
byte[] cipherText;
|};

# Returns the ML-KEM-768-HPKE-encrypted value for the given data.
# Returns the ML-KEM-768-AES-hybrid-encrypted value for the given data.
# ```ballerina
# string input = "Hello Ballerina";
# byte[] data = input.toBytes();
Expand All @@ -52,7 +52,7 @@ public isolated function encryptMlKem768Hpke(byte[] input, PublicKey publicKey,
};
}

# Returns the ML-KEM-768-HPKE-decrypted value for the given encrypted data.
# Returns the ML-KEM-768-AES-hybrid-encrypted value for the given encrypted data.
# ```ballerina
# string input = "Hello Ballerina";
# byte[] data = input.toBytes();
Expand All @@ -78,7 +78,7 @@ public isolated function decryptMlKem768Hpke(byte[] input, byte[] encapsulatedKe
return check decryptAesEcb(input, key);
}

# Returns the RSA-ML-KEM-768-HPKE-encrypted value for the given data.
# Returns the RSA-KEM-ML-KEM-768-AES-hybrid-encrypted value for the given data.
# ```ballerina
# string input = "Hello Ballerina";
# byte[] data = input.toBytes();
Expand Down Expand Up @@ -109,7 +109,7 @@ public isolated function encryptRsaKemMlKem768Hpke(byte[] input, PublicKey rsaPu
};
}

# Returns the RSA-ML-KEM-768-HPKE-decrypted value for the given encrypted data.
# Returns the RSA-KEM-ML-KEM-768-AES-hybrid-encrypted value for the given encrypted data.
# ```ballerina
# string input = "Hello Ballerina";
# byte[] data = input.toBytes();
Expand Down
6 changes: 5 additions & 1 deletion ballerina/kdf.bal
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@
import ballerina/jballerina.java;

# Returns HKDF (HMAC-based Key Derivation Function) using SHA-256 as the hash function.
#
# ```ballerina
# string secret = "some-secret";
# byte[] key = secret.toBytes();
# byte[] hash = crypto:hkdfSha256(key, 32);
# ```
# + input - The input key material to derive the key from
# + length - The length of the output keying material (OKM) in bytes
# + salt - Optional salt value, a non-secret random value
Expand Down

0 comments on commit 39080cd

Please sign in to comment.