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.
@@ -1,14 +1,17 @@
1
1
  name: Publish to npm
2
2
 
3
3
  on:
4
- push:
5
- tags:
6
- - 'v*'
4
+ release:
5
+ types: [published]
7
6
 
8
7
  jobs:
9
- publish:
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
- AesBridge is a modern cross-language AES encryption library that provides
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
  ![CI Status](https://github.com/mervick/aes-bridge-js/actions/workflows/tests.yml/badge.svg)
3
3
 
4
- AesBridge is a modern, secure, and cross-language AES encryption library that supports **GCM**, **CBC**, and **legacy AES Everywhere** modes.
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
- - ✅ Works in both Node.js and browsers (UMD + ESM + CJS)
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
- ### CBC Mode
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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aes-bridge",
3
- "version": "2.0.1",
3
+ "version": "2.0.3",
4
4
  "description": "AesBridge is a modern, secure and cross-language AES encryption library",
5
5
  "type": "module",
6
6
  "main": "dist/aes-bridge.umd.js",