Skip to content

Commit

Permalink
docs: fix jsdoc for importKey and exportKey
Browse files Browse the repository at this point in the history
  • Loading branch information
mikesposito committed Nov 9, 2023
1 parent ce50096 commit 1319749
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,11 @@ export async function decryptWithKey<R>(
/**
* Receives an exported CryptoKey string and creates a key.
*
* This function supports both JsonWebKey's and exported EncryptionKey's.
* It will return a CryptoKey for the former, and an EncryptionKey for the latter.
*
* @param keyString - The key string to import.
* @returns An EncryptionKey.
* @returns An EncryptionKey or a CryptoKey.
*/
export async function importKey(
keyString: string,
Expand Down Expand Up @@ -265,10 +268,10 @@ export async function importKey(
}

/**
* Receives an exported CryptoKey string, creates a key,
* and decrypts cipher text with the reconstructed key.
* Exports a key string from a CryptoKey or from an
* EncryptionKey instance.
*
* @param encryptionKey - The CryptoKey to export.
* @param encryptionKey - The CryptoKey or EncryptionKey to export.
* @returns A key string.
*/
export async function exportKey(
Expand Down

0 comments on commit 1319749

Please sign in to comment.