Skip to content

Commit

Permalink
add typedoc
Browse files Browse the repository at this point in the history
  • Loading branch information
POPPIN-FUMI committed Aug 28, 2023
1 parent 674db0e commit 574d9cd
Show file tree
Hide file tree
Showing 128 changed files with 1,831 additions and 315 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@

Skeet Utils Plugin for Utitilies.

This plugin is a collection of utilities for basic operations.

- Encryption
- String
- Number
- Time
- Http
- Notification

# Installation

```bash
Expand All @@ -39,6 +48,8 @@ $ yarn add @skeet-framework/utils

# Skeet Utils Docs

More information can be found in the following documents.

- [Skeet Utils TypeDoc](https://elsoul.github.io/skeet-utils/)

## Skeet Framework Document
Expand Down
22 changes: 22 additions & 0 deletions dist/cjs/lib/crypto/base64.d.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,24 @@
/**
* Encodes a payload to base64.
*
* @param payload - The data to be encoded.
* @returns The base64-encoded payload.
*
* @example
* const data = 'Hello, world!';
* const encodedData = encodeBase64(data);
* console.log(encodedData); // Base64-encoded data
*/
export declare const encodeBase64: (payload: string) => string;
/**
* Decodes a base64-encoded payload to a string.
*
* @param payload - The base64-encoded data to be decoded.
* @returns The decoded payload as a UTF-8 string.
*
* @example
* const encodedData = 'SGVsbG8sIHdvcmxkIQ=='; // Base64-encoded data
* const decodedData = decodeBase64(encodedData);
* console.log(decodedData); // Decoded data: "Hello, world!"
*/
export declare const decodeBase64: (payload: string) => string;
22 changes: 22 additions & 0 deletions dist/cjs/lib/crypto/base64.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/cjs/lib/crypto/base64.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions dist/cjs/lib/crypto/crypto.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export declare const encrypt: (data: string, iv: string, password: string, salt: string) => string;
export declare const decrypt: (data: string, iv: string, password: string, salt: string) => string;
export declare const generateIv: () => string;
export declare const algorithm = "aes-256-cbc";
export declare const inputEncoding = "utf8";
export declare const outputEncoding = "base64";
45 changes: 4 additions & 41 deletions dist/cjs/lib/crypto/crypto.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/cjs/lib/crypto/crypto.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions dist/cjs/lib/crypto/decrypt.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/**
* @module crypto
* @preferred
*/
/**
* Decrypts data using the given parameters.
*
* @param encryptedData - The encrypted data.
* @param iv - The initialization vector.
* @param password - The password for decryption.
* @param salt - The salt for key derivation.
* @returns The decrypted data.
*
* @example
* const encrypted = 'EncryptedDataHere'; // Encrypted data obtained from the encryption process
* const iv = '1234567890123456'; // Initialization vector used in the encryption process
* const password = 'MySecretPassword'; // Password used in the encryption process
* const salt = 'MySalt'; // Salt used in the encryption process
* const decrypted = decrypt(encrypted, iv, password, salt);
* console.log(decrypted);
*/
export declare const decrypt: (encryptedData: string, iv: string, password: string, salt: string) => string;
40 changes: 40 additions & 0 deletions dist/cjs/lib/crypto/decrypt.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/cjs/lib/crypto/decrypt.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions dist/cjs/lib/crypto/encrypt.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/**
* @module crypto
* @preferred
*/
/**
* Encrypts data using the given parameters.
*
* @param data - The data to be encrypted.
* @param iv - The initialization vector.
* @param password - The password for encryption.
* @param salt - The salt for key derivation.
* @returns The encrypted data.
*
* @example
* const data = 'Sensitive information';
* const iv = '1234567890123456'; // 16 characters
* const password = 'MySecretPassword';
* const salt = 'MySalt';
* const encrypted = encrypt(data, iv, password, salt);
* console.log(encrypted);
*/
export declare const encrypt: (data: string, iv: string, password: string, salt: string) => string;
40 changes: 40 additions & 0 deletions dist/cjs/lib/crypto/encrypt.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/cjs/lib/crypto/encrypt.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions dist/cjs/lib/crypto/genRandomSalt.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
/**
* Generates a random salt for key derivation.
*
* @param bytes - The number of bytes for the generated salt. Default is 16 bytes.
* @returns The generated salt as a hexadecimal string.
*
* @example
* const salt = generateRandomSalt();
* console.log(salt); // Random hexadecimal salt
*/
export declare function generateRandomSalt(bytes?: number): string;
17 changes: 16 additions & 1 deletion dist/cjs/lib/crypto/genRandomSalt.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/cjs/lib/crypto/genRandomSalt.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions dist/cjs/lib/crypto/generateIv.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/**
* Generates a random initialization vector (IV) for encryption.
*
* @returns The generated initialization vector as a base64-encoded string.
*
* @example
* const iv = generateIv();
* console.log(iv); // Random base64-encoded initialization vector
*/
export declare const generateIv: () => string;
25 changes: 25 additions & 0 deletions dist/cjs/lib/crypto/generateIv.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/cjs/lib/crypto/generateIv.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion dist/cjs/lib/crypto/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
export * from './base64';
export * from './crypto';
export * from './placeholder';
export * from './genRandomSalt';
export * from './generateIv';
export * from './encrypt';
export * from './decrypt';
4 changes: 3 additions & 1 deletion dist/cjs/lib/crypto/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/cjs/lib/crypto/index.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 574d9cd

Please sign in to comment.