Skip to content

Commit c3219cf

Browse files
committed
testing jsdoc
1 parent 2186b42 commit c3219cf

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
{
33
"name": "cas-typescript-sdk",
4-
"version": "1.0.18",
4+
"version": "1.0.19",
55
"description": "",
66
"main": "lib/index.js",
77
"types": "lib/index.d.ts",

src-ts/symmetric/aes-wrapper.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,32 @@ import {
1111
aesNonce,
1212
} from "../../index";
1313

14+
/**
15+
* @description A wrapper class that contains methods to construct keys, nonces, and methods to encrypt and decrypt with AES-128-GCM and AES-256-GCM
16+
*
17+
* @example
18+
* ```ts
19+
* const nonce = aesWrapper.generateAESNonce();
20+
const key = aesWrapper.aes128Key();
21+
const textEncoder = new TextEncoder();
22+
const array = Array.from(textEncoder.encode("Hello World"));
23+
const encrypted = aesWrapper.aes128Encrypt(key, nonce, array);
24+
* ```
25+
*/
1426
export class AESWrapper {
27+
28+
/**
29+
* @description Generates a 128 bit AES key
30+
* @returns returns a 128 bit AES key
31+
*/
1532
public aes128Key(): Array<number> {
1633
return aes128Key();
1734
}
1835

36+
/**
37+
* @description Generates a 256 bit AES key
38+
* @returns returns a 256 bit AES key
39+
*/
1940
public aes256Key(): Array<number> {
2041
return aes256Key();
2142
}

0 commit comments

Comments
 (0)