Skip to content

Commit a9bd3c8

Browse files
committed
docs(readme): update mermaid diagrams for multi-algorithm support 🎨
1 parent a825949 commit a9bd3c8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,9 @@ const arrayToken: string = jwt.sign([1, 2, 3])
110110

111111
```javascript
112112
const jwt = new SecureJWT({
113+
algorithm: 'aes-256-gcm', // Optional: default: 'aes-256-gcm'
113114
secret: 'your-secret-key', // Required: 8-255 characters
114115
expireIn: '1h', // Required: Time string
115-
algorithm: 'aes-256-gcm', // Optional: default: 'aes-256-gcm'
116116
version: '1.0.0', // Optional: Default '1.0.0'
117117
cached: 1000 // Optional: Cache size (default: 1000)
118118
})
@@ -227,7 +227,7 @@ try {
227227
graph TD
228228
A[User Data] --> B[Sign Request]
229229
B --> C[Create Payload]
230-
C --> D[AES-256-GCM Encrypt]
230+
C --> D[Multi Algorithm Encryption]
231231
D --> E[Generate Token]
232232
E --> F[Store in Cache]
233233
F --> G[Return Token]
@@ -261,15 +261,15 @@ graph TD
261261

262262
### 🔐 JWT Encoding Process
263263

264-
> This diagram details the token creation process with AES-256-GCM encryption. Each token gets a **random IV** for uniqueness, **version-based AAD** for compatibility, and **authentication tags** for tamper detection. The **caching system** stores encrypted tokens for instant retrieval, providing massive performance improvements for repeated verifications.
264+
> This diagram details the token creation process with **multi-algorithm encryption**. Each token gets a **random IV** for uniqueness, **version-based AAD** for compatibility, and **authentication tags** for tamper detection. The **caching system** stores encrypted tokens for instant retrieval, providing massive performance improvements for repeated verifications.
265265
266266
```mermaid
267267
graph TD
268268
A[User Data] --> B[Create Payload]
269269
B --> C[Add Timestamps & Version]
270270
C --> D[JSON Stringify Payload]
271271
D --> E[Generate Random IV]
272-
E --> F[AES-256-GCM Encryption]
272+
E --> F[Multi Algorithm Encryption]
273273
F --> G[Create Token Structure]
274274
G --> H[Base64 Encode]
275275
H --> I[Secure JWT Token]

0 commit comments

Comments
 (0)