]> git.ardis.lu - static-encrypt/commitdiff
Add JSDoc comments
authorArdis Lu <ardisglu@gmail.com>
Sat, 25 Feb 2023 04:42:27 +0000 (20:42 -0800)
committerArdis Lu <ardisglu@gmail.com>
Sat, 25 Feb 2023 04:42:27 +0000 (20:42 -0800)
decrypt.js
encrypt.js

index 9b5dd5454537a2d18d952d61b5c9ec5afabb97e6..0e4e897c70bd0295a2ee50ba95683b706bb4f29c 100644 (file)
@@ -1,3 +1,9 @@
+/**
+ * Decrypt an encrypted string.
+ * @param {string} content - The ciphertext to decrypt.
+ * @param {string} password - The password used to encrypt the string.
+ * @returns {Promise<string>} A promise that resolves the plaintext.
+ */
 export default async function decrypt(content, password) {
   const encodedPassword = new TextEncoder().encode(password);
 
index e8ccc52279a813c7d18e737d27a9615071ce2540..f2c52ea7a4699a1074ce2779b4d0e5ecc90a6913 100644 (file)
@@ -1,3 +1,9 @@
+/**
+ * Encrypt a string.
+ * @param {string} plaintext - The string to encrypt.
+ * @param {string} password - The password used to encrypt the string.
+ * @returns {Promise<string>} A promise that resolves the ciphertext.
+ */
 export default async function encrypt(plaintext, password) {
   const encoder = new TextEncoder();
   const encodedPlaintext = encoder.encode(plaintext);
This page took 0.034611 seconds and 4 git commands to generate.