aes-bridge 2.0.1 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/publish.yml +7 -4
- package/LICENSE +1 -5
- package/README.md +22 -19
- package/package.json +1 -1
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
name: Publish to npm
|
|
2
2
|
|
|
3
3
|
on:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
- 'v*'
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
7
6
|
|
|
8
7
|
jobs:
|
|
9
|
-
|
|
8
|
+
deploy:
|
|
10
9
|
runs-on: ubuntu-latest
|
|
11
10
|
|
|
11
|
+
environment:
|
|
12
|
+
name: npm
|
|
13
|
+
url: https://www.npmjs.com/package/aes-bridge
|
|
14
|
+
|
|
12
15
|
steps:
|
|
13
16
|
- name: Checkout repository
|
|
14
17
|
uses: actions/checkout@v4
|
package/LICENSE
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
a unified interface for encrypting and decrypting data across multiple
|
|
5
|
-
programming languages and platforms.
|
|
6
|
-
|
|
7
|
-
Copyright (c) 2018-2025 Andrey Izman
|
|
3
|
+
Copyright (c) 2018-2025 Andrey Izman <izmanw@gmail.com>
|
|
8
4
|
|
|
9
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
10
6
|
of this software and associated documentation files (the "Software"), to deal
|
package/README.md
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
# AesBridge JS
|
|
2
2
|

|
|
3
3
|
|
|
4
|
-
AesBridge is a modern, secure, and cross-language AES encryption library
|
|
4
|
+
**AesBridge** is a modern, secure, and cross-language **AES** encryption library. It offers a unified interface for encrypting and decrypting data across multiple programming languages. Supports **GCM**, **CBC**, and **legacy AES Everywhere** modes.
|
|
5
|
+
|
|
5
6
|
|
|
6
7
|
This is the **JavaScript implementation** of the core project.
|
|
7
8
|
👉 Main repository: https://github.com/mervick/aes-bridge
|
|
@@ -11,7 +12,9 @@ This is the **JavaScript implementation** of the core project.
|
|
|
11
12
|
- 🔐 AES-256 encryption in GCM and CBC modes
|
|
12
13
|
- 🌍 Unified cross-language design
|
|
13
14
|
- 📦 Compact binary format or base64 output
|
|
14
|
-
- ✅
|
|
15
|
+
- ✅ HMAC Integrity: CBC mode includes HMAC verification
|
|
16
|
+
- 🔄 Backward Compatible: Supports legacy AES Everywhere format
|
|
17
|
+
- 💻 Works in both Node.js and browsers (UMD + ESM + CJS)
|
|
15
18
|
|
|
16
19
|
## Quick Start
|
|
17
20
|
|
|
@@ -65,23 +68,7 @@ const plaintext = await decrypt(ciphertext, 'MyStrongPass');
|
|
|
65
68
|
- `decrypt(ciphertext, passphrase)`
|
|
66
69
|
Decrypts a base64-encoded string encrypted with AES-GCM.
|
|
67
70
|
|
|
68
|
-
###
|
|
69
|
-
|
|
70
|
-
- `encryptCbc(data, passphrase)`
|
|
71
|
-
Encrypts a string using AES-CBC.
|
|
72
|
-
HMAC is used for integrity verification.
|
|
73
|
-
**Returns:** base64-encoded string.
|
|
74
|
-
|
|
75
|
-
- `decryptCbc(ciphertext, passphrase)`
|
|
76
|
-
Decrypts a base64-encoded string encrypted with `encrypt_cbc` and verifies HMAC.
|
|
77
|
-
|
|
78
|
-
- `encryptCbcBin(data, passphrase)`
|
|
79
|
-
Returns encrypted binary data using AES-CBC with HMAC.
|
|
80
|
-
|
|
81
|
-
- `decryptCbcBin(ciphertext, passphrase)`
|
|
82
|
-
Decrypts binary data encrypted with `encrypt_cbc_bin` and verifies HMAC.
|
|
83
|
-
|
|
84
|
-
### GCM Mode
|
|
71
|
+
### GCM Mode (recommended)
|
|
85
72
|
|
|
86
73
|
- `encryptGcm(data, passphrase)`
|
|
87
74
|
Encrypts a string using AES-GCM.
|
|
@@ -96,6 +83,22 @@ const plaintext = await decrypt(ciphertext, 'MyStrongPass');
|
|
|
96
83
|
- `decryptGcmBin(ciphertext, passphrase)`
|
|
97
84
|
Decrypts binary data encrypted with `encryptGcmBin`.
|
|
98
85
|
|
|
86
|
+
### CBC Mode
|
|
87
|
+
|
|
88
|
+
- `encryptCbc(data, passphrase)`
|
|
89
|
+
Encrypts a string using AES-CBC.
|
|
90
|
+
HMAC is used for integrity verification.
|
|
91
|
+
**Returns:** base64-encoded string.
|
|
92
|
+
|
|
93
|
+
- `decryptCbc(ciphertext, passphrase)`
|
|
94
|
+
Decrypts a base64-encoded string encrypted with `encryptCbc` and verifies HMAC.
|
|
95
|
+
|
|
96
|
+
- `encryptCbcBin(data, passphrase)`
|
|
97
|
+
Returns encrypted binary data using AES-CBC with HMAC.
|
|
98
|
+
|
|
99
|
+
- `decryptCbcBin(ciphertext, passphrase)`
|
|
100
|
+
Decrypts binary data encrypted with `encryptCbcBin` and verifies HMAC.
|
|
101
|
+
|
|
99
102
|
### Legacy Compatibility
|
|
100
103
|
|
|
101
104
|
⚠️ These functions are kept for backward compatibility only.
|