@alibarbar/common 1.0.10 → 1.1.1
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/dist/algorithm.cjs +1 -1
- package/dist/algorithm.js +1 -1
- package/dist/array.cjs +1 -1
- package/dist/array.js +1 -1
- package/dist/color.cjs +1 -1
- package/dist/color.js +1 -1
- package/dist/crypto.cjs +109 -1
- package/dist/crypto.d.mts +48 -1
- package/dist/crypto.d.ts +48 -1
- package/dist/crypto.js +104 -2
- package/dist/data-structure.cjs +1 -1
- package/dist/data-structure.js +1 -1
- package/dist/date.cjs +1 -1
- package/dist/date.js +1 -1
- package/dist/dom.cjs +1 -1
- package/dist/dom.js +1 -1
- package/dist/file.cjs +1 -1
- package/dist/file.js +1 -1
- package/dist/i18n.cjs +1 -1
- package/dist/i18n.js +1 -1
- package/dist/index.cjs +848 -415
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +838 -413
- package/dist/network.cjs +1 -1
- package/dist/network.js +1 -1
- package/dist/number.cjs +1 -1
- package/dist/number.js +1 -1
- package/dist/object.cjs +1 -1
- package/dist/object.js +1 -1
- package/dist/performance.cjs +1 -1
- package/dist/performance.js +1 -1
- package/dist/storage.cjs +509 -104
- package/dist/storage.d.mts +50 -73
- package/dist/storage.d.ts +50 -73
- package/dist/storage.js +505 -102
- package/dist/string.cjs +1 -1
- package/dist/string.js +1 -1
- package/dist/tracking.cjs +1 -1
- package/dist/tracking.js +1 -1
- package/dist/transform.cjs +1 -1
- package/dist/transform.js +1 -1
- package/dist/upload.cjs +2 -2
- package/dist/upload.d.mts +1 -1
- package/dist/upload.d.ts +1 -1
- package/dist/upload.js +2 -2
- package/dist/url.cjs +1 -1
- package/dist/url.js +1 -1
- package/dist/validation.cjs +1 -1
- package/dist/validation.js +1 -1
- package/package.json +3 -1
- /package/dist/{upload-DchqyDBQ.d.mts → index-DchqyDBQ.d.mts} +0 -0
- /package/dist/{upload-DchqyDBQ.d.ts → index-DchqyDBQ.d.ts} +0 -0
package/dist/algorithm.cjs
CHANGED
package/dist/algorithm.js
CHANGED
package/dist/array.cjs
CHANGED
package/dist/array.js
CHANGED
package/dist/color.cjs
CHANGED
package/dist/color.js
CHANGED
package/dist/crypto.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
// src/helper/crypto.ts
|
|
3
|
+
// src/helper/crypto/index.ts
|
|
4
4
|
async function sha256(data) {
|
|
5
5
|
const buffer = typeof data === "string" ? new TextEncoder().encode(data) : data;
|
|
6
6
|
const hashBuffer = await crypto.subtle.digest("SHA-256", buffer);
|
|
@@ -171,11 +171,118 @@ async function importPrivateKey(keyData) {
|
|
|
171
171
|
["decrypt"]
|
|
172
172
|
);
|
|
173
173
|
}
|
|
174
|
+
async function generateHMACKey() {
|
|
175
|
+
if (typeof crypto === "undefined" || !crypto.subtle) {
|
|
176
|
+
throw new Error("Web Crypto API is not available");
|
|
177
|
+
}
|
|
178
|
+
return crypto.subtle.generateKey(
|
|
179
|
+
{
|
|
180
|
+
name: "HMAC",
|
|
181
|
+
hash: "SHA-256"
|
|
182
|
+
},
|
|
183
|
+
true,
|
|
184
|
+
["sign", "verify"]
|
|
185
|
+
);
|
|
186
|
+
}
|
|
187
|
+
async function computeHMAC(data, key) {
|
|
188
|
+
if (typeof crypto === "undefined" || !crypto.subtle) {
|
|
189
|
+
throw new Error("Web Crypto API is not available");
|
|
190
|
+
}
|
|
191
|
+
const buffer = typeof data === "string" ? new TextEncoder().encode(data) : data;
|
|
192
|
+
const signature = await crypto.subtle.sign("HMAC", key, buffer);
|
|
193
|
+
return base64Encode(signature);
|
|
194
|
+
}
|
|
195
|
+
async function verifyHMAC(data, signature, key) {
|
|
196
|
+
if (typeof crypto === "undefined" || !crypto.subtle) {
|
|
197
|
+
throw new Error("Web Crypto API is not available");
|
|
198
|
+
}
|
|
199
|
+
try {
|
|
200
|
+
const dataBuffer = typeof data === "string" ? new TextEncoder().encode(data) : data;
|
|
201
|
+
const signatureBuffer = new Uint8Array(
|
|
202
|
+
atob(signature).split("").map((char) => char.charCodeAt(0))
|
|
203
|
+
);
|
|
204
|
+
return await crypto.subtle.verify("HMAC", key, signatureBuffer, dataBuffer);
|
|
205
|
+
} catch {
|
|
206
|
+
return false;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
async function deriveKeyFromPassword(password, salt, iterations = 1e5, keyLength = 256) {
|
|
210
|
+
if (typeof crypto === "undefined" || !crypto.subtle) {
|
|
211
|
+
throw new Error("Web Crypto API is not available");
|
|
212
|
+
}
|
|
213
|
+
const saltBuffer = typeof salt === "string" ? new TextEncoder().encode(salt) : salt;
|
|
214
|
+
const passwordKey = await crypto.subtle.importKey(
|
|
215
|
+
"raw",
|
|
216
|
+
new TextEncoder().encode(password),
|
|
217
|
+
"PBKDF2",
|
|
218
|
+
false,
|
|
219
|
+
["deriveBits", "deriveKey"]
|
|
220
|
+
);
|
|
221
|
+
return crypto.subtle.deriveKey(
|
|
222
|
+
{
|
|
223
|
+
name: "PBKDF2",
|
|
224
|
+
salt: saltBuffer,
|
|
225
|
+
iterations,
|
|
226
|
+
hash: "SHA-256"
|
|
227
|
+
},
|
|
228
|
+
passwordKey,
|
|
229
|
+
{
|
|
230
|
+
name: "AES-GCM",
|
|
231
|
+
length: keyLength
|
|
232
|
+
},
|
|
233
|
+
false,
|
|
234
|
+
["encrypt", "decrypt"]
|
|
235
|
+
);
|
|
236
|
+
}
|
|
237
|
+
async function aesGCMEncrypt(data, key) {
|
|
238
|
+
if (typeof crypto === "undefined" || !crypto.subtle) {
|
|
239
|
+
throw new Error("Web Crypto API is not available");
|
|
240
|
+
}
|
|
241
|
+
const dataBuffer = typeof data === "string" ? new TextEncoder().encode(data) : data;
|
|
242
|
+
const iv = crypto.getRandomValues(new Uint8Array(12));
|
|
243
|
+
const encrypted = await crypto.subtle.encrypt(
|
|
244
|
+
{
|
|
245
|
+
name: "AES-GCM",
|
|
246
|
+
iv
|
|
247
|
+
},
|
|
248
|
+
key,
|
|
249
|
+
dataBuffer
|
|
250
|
+
);
|
|
251
|
+
return {
|
|
252
|
+
encrypted: base64Encode(encrypted),
|
|
253
|
+
iv: base64Encode(iv.buffer)
|
|
254
|
+
};
|
|
255
|
+
}
|
|
256
|
+
async function aesGCMDecrypt(encryptedData, iv, key) {
|
|
257
|
+
if (typeof crypto === "undefined" || !crypto.subtle) {
|
|
258
|
+
throw new Error("Web Crypto API is not available");
|
|
259
|
+
}
|
|
260
|
+
const encryptedBuffer = new Uint8Array(
|
|
261
|
+
atob(encryptedData).split("").map((char) => char.charCodeAt(0))
|
|
262
|
+
);
|
|
263
|
+
const ivBuffer = new Uint8Array(
|
|
264
|
+
atob(iv).split("").map((char) => char.charCodeAt(0))
|
|
265
|
+
);
|
|
266
|
+
const decrypted = await crypto.subtle.decrypt(
|
|
267
|
+
{
|
|
268
|
+
name: "AES-GCM",
|
|
269
|
+
iv: ivBuffer
|
|
270
|
+
},
|
|
271
|
+
key,
|
|
272
|
+
encryptedBuffer
|
|
273
|
+
);
|
|
274
|
+
return new TextDecoder().decode(decrypted);
|
|
275
|
+
}
|
|
174
276
|
|
|
277
|
+
exports.aesGCMDecrypt = aesGCMDecrypt;
|
|
278
|
+
exports.aesGCMEncrypt = aesGCMEncrypt;
|
|
175
279
|
exports.base64Decode = base64Decode;
|
|
176
280
|
exports.base64Encode = base64Encode;
|
|
281
|
+
exports.computeHMAC = computeHMAC;
|
|
282
|
+
exports.deriveKeyFromPassword = deriveKeyFromPassword;
|
|
177
283
|
exports.exportPrivateKey = exportPrivateKey;
|
|
178
284
|
exports.exportPublicKey = exportPublicKey;
|
|
285
|
+
exports.generateHMACKey = generateHMACKey;
|
|
179
286
|
exports.generateRSAKeyPair = generateRSAKeyPair;
|
|
180
287
|
exports.generateRandomString = generateRandomString;
|
|
181
288
|
exports.generateUUID = generateUUID;
|
|
@@ -185,3 +292,4 @@ exports.importPublicKey = importPublicKey;
|
|
|
185
292
|
exports.rsaDecrypt = rsaDecrypt;
|
|
186
293
|
exports.rsaEncrypt = rsaEncrypt;
|
|
187
294
|
exports.sha256 = sha256;
|
|
295
|
+
exports.verifyHMAC = verifyHMAC;
|
package/dist/crypto.d.mts
CHANGED
|
@@ -88,5 +88,52 @@ declare function importPublicKey(keyData: string): Promise<CryptoKey>;
|
|
|
88
88
|
* @returns Promise<CryptoKey> 私钥对象
|
|
89
89
|
*/
|
|
90
90
|
declare function importPrivateKey(keyData: string): Promise<CryptoKey>;
|
|
91
|
+
/**
|
|
92
|
+
* 生成 HMAC 密钥
|
|
93
|
+
* @returns Promise<CryptoKey> HMAC 密钥
|
|
94
|
+
*/
|
|
95
|
+
declare function generateHMACKey(): Promise<CryptoKey>;
|
|
96
|
+
/**
|
|
97
|
+
* 计算 HMAC 签名
|
|
98
|
+
* @param data - 要签名的数据(字符串或ArrayBuffer)
|
|
99
|
+
* @param key - HMAC密钥
|
|
100
|
+
* @returns Promise<string> Base64编码的HMAC签名
|
|
101
|
+
*/
|
|
102
|
+
declare function computeHMAC(data: string | ArrayBuffer, key: CryptoKey): Promise<string>;
|
|
103
|
+
/**
|
|
104
|
+
* 验证 HMAC 签名
|
|
105
|
+
* @param data - 原始数据(字符串或ArrayBuffer)
|
|
106
|
+
* @param signature - Base64编码的HMAC签名
|
|
107
|
+
* @param key - HMAC密钥
|
|
108
|
+
* @returns Promise<boolean> 签名是否有效
|
|
109
|
+
*/
|
|
110
|
+
declare function verifyHMAC(data: string | ArrayBuffer, signature: string, key: CryptoKey): Promise<boolean>;
|
|
111
|
+
/**
|
|
112
|
+
* 使用 PBKDF2 派生密钥
|
|
113
|
+
* @param password - 密码(字符串)
|
|
114
|
+
* @param salt - 盐值(ArrayBuffer 或字符串)
|
|
115
|
+
* @param iterations - 迭代次数,默认为 100000
|
|
116
|
+
* @param keyLength - 密钥长度(位),默认为 256
|
|
117
|
+
* @returns Promise<CryptoKey> 派生的密钥
|
|
118
|
+
*/
|
|
119
|
+
declare function deriveKeyFromPassword(password: string, salt: ArrayBuffer | string, iterations?: number, keyLength?: number): Promise<CryptoKey>;
|
|
120
|
+
/**
|
|
121
|
+
* 使用 AES-GCM 加密数据
|
|
122
|
+
* @param data - 要加密的数据(字符串或ArrayBuffer)
|
|
123
|
+
* @param key - AES密钥
|
|
124
|
+
* @returns Promise<{encrypted: string, iv: string}> 加密后的数据和初始向量(Base64编码)
|
|
125
|
+
*/
|
|
126
|
+
declare function aesGCMEncrypt(data: string | ArrayBuffer, key: CryptoKey): Promise<{
|
|
127
|
+
encrypted: string;
|
|
128
|
+
iv: string;
|
|
129
|
+
}>;
|
|
130
|
+
/**
|
|
131
|
+
* 使用 AES-GCM 解密数据
|
|
132
|
+
* @param encryptedData - Base64编码的加密数据
|
|
133
|
+
* @param iv - Base64编码的初始向量
|
|
134
|
+
* @param key - AES密钥
|
|
135
|
+
* @returns Promise<string> 解密后的字符串
|
|
136
|
+
*/
|
|
137
|
+
declare function aesGCMDecrypt(encryptedData: string, iv: string, key: CryptoKey): Promise<string>;
|
|
91
138
|
|
|
92
|
-
export { type RSAKeyPair, base64Decode, base64Encode, exportPrivateKey, exportPublicKey, generateRSAKeyPair, generateRandomString, generateUUID, hash, importPrivateKey, importPublicKey, rsaDecrypt, rsaEncrypt, sha256 };
|
|
139
|
+
export { type RSAKeyPair, aesGCMDecrypt, aesGCMEncrypt, base64Decode, base64Encode, computeHMAC, deriveKeyFromPassword, exportPrivateKey, exportPublicKey, generateHMACKey, generateRSAKeyPair, generateRandomString, generateUUID, hash, importPrivateKey, importPublicKey, rsaDecrypt, rsaEncrypt, sha256, verifyHMAC };
|
package/dist/crypto.d.ts
CHANGED
|
@@ -88,5 +88,52 @@ declare function importPublicKey(keyData: string): Promise<CryptoKey>;
|
|
|
88
88
|
* @returns Promise<CryptoKey> 私钥对象
|
|
89
89
|
*/
|
|
90
90
|
declare function importPrivateKey(keyData: string): Promise<CryptoKey>;
|
|
91
|
+
/**
|
|
92
|
+
* 生成 HMAC 密钥
|
|
93
|
+
* @returns Promise<CryptoKey> HMAC 密钥
|
|
94
|
+
*/
|
|
95
|
+
declare function generateHMACKey(): Promise<CryptoKey>;
|
|
96
|
+
/**
|
|
97
|
+
* 计算 HMAC 签名
|
|
98
|
+
* @param data - 要签名的数据(字符串或ArrayBuffer)
|
|
99
|
+
* @param key - HMAC密钥
|
|
100
|
+
* @returns Promise<string> Base64编码的HMAC签名
|
|
101
|
+
*/
|
|
102
|
+
declare function computeHMAC(data: string | ArrayBuffer, key: CryptoKey): Promise<string>;
|
|
103
|
+
/**
|
|
104
|
+
* 验证 HMAC 签名
|
|
105
|
+
* @param data - 原始数据(字符串或ArrayBuffer)
|
|
106
|
+
* @param signature - Base64编码的HMAC签名
|
|
107
|
+
* @param key - HMAC密钥
|
|
108
|
+
* @returns Promise<boolean> 签名是否有效
|
|
109
|
+
*/
|
|
110
|
+
declare function verifyHMAC(data: string | ArrayBuffer, signature: string, key: CryptoKey): Promise<boolean>;
|
|
111
|
+
/**
|
|
112
|
+
* 使用 PBKDF2 派生密钥
|
|
113
|
+
* @param password - 密码(字符串)
|
|
114
|
+
* @param salt - 盐值(ArrayBuffer 或字符串)
|
|
115
|
+
* @param iterations - 迭代次数,默认为 100000
|
|
116
|
+
* @param keyLength - 密钥长度(位),默认为 256
|
|
117
|
+
* @returns Promise<CryptoKey> 派生的密钥
|
|
118
|
+
*/
|
|
119
|
+
declare function deriveKeyFromPassword(password: string, salt: ArrayBuffer | string, iterations?: number, keyLength?: number): Promise<CryptoKey>;
|
|
120
|
+
/**
|
|
121
|
+
* 使用 AES-GCM 加密数据
|
|
122
|
+
* @param data - 要加密的数据(字符串或ArrayBuffer)
|
|
123
|
+
* @param key - AES密钥
|
|
124
|
+
* @returns Promise<{encrypted: string, iv: string}> 加密后的数据和初始向量(Base64编码)
|
|
125
|
+
*/
|
|
126
|
+
declare function aesGCMEncrypt(data: string | ArrayBuffer, key: CryptoKey): Promise<{
|
|
127
|
+
encrypted: string;
|
|
128
|
+
iv: string;
|
|
129
|
+
}>;
|
|
130
|
+
/**
|
|
131
|
+
* 使用 AES-GCM 解密数据
|
|
132
|
+
* @param encryptedData - Base64编码的加密数据
|
|
133
|
+
* @param iv - Base64编码的初始向量
|
|
134
|
+
* @param key - AES密钥
|
|
135
|
+
* @returns Promise<string> 解密后的字符串
|
|
136
|
+
*/
|
|
137
|
+
declare function aesGCMDecrypt(encryptedData: string, iv: string, key: CryptoKey): Promise<string>;
|
|
91
138
|
|
|
92
|
-
export { type RSAKeyPair, base64Decode, base64Encode, exportPrivateKey, exportPublicKey, generateRSAKeyPair, generateRandomString, generateUUID, hash, importPrivateKey, importPublicKey, rsaDecrypt, rsaEncrypt, sha256 };
|
|
139
|
+
export { type RSAKeyPair, aesGCMDecrypt, aesGCMEncrypt, base64Decode, base64Encode, computeHMAC, deriveKeyFromPassword, exportPrivateKey, exportPublicKey, generateHMACKey, generateRSAKeyPair, generateRandomString, generateUUID, hash, importPrivateKey, importPublicKey, rsaDecrypt, rsaEncrypt, sha256, verifyHMAC };
|
package/dist/crypto.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// src/helper/crypto.ts
|
|
1
|
+
// src/helper/crypto/index.ts
|
|
2
2
|
async function sha256(data) {
|
|
3
3
|
const buffer = typeof data === "string" ? new TextEncoder().encode(data) : data;
|
|
4
4
|
const hashBuffer = await crypto.subtle.digest("SHA-256", buffer);
|
|
@@ -169,5 +169,107 @@ async function importPrivateKey(keyData) {
|
|
|
169
169
|
["decrypt"]
|
|
170
170
|
);
|
|
171
171
|
}
|
|
172
|
+
async function generateHMACKey() {
|
|
173
|
+
if (typeof crypto === "undefined" || !crypto.subtle) {
|
|
174
|
+
throw new Error("Web Crypto API is not available");
|
|
175
|
+
}
|
|
176
|
+
return crypto.subtle.generateKey(
|
|
177
|
+
{
|
|
178
|
+
name: "HMAC",
|
|
179
|
+
hash: "SHA-256"
|
|
180
|
+
},
|
|
181
|
+
true,
|
|
182
|
+
["sign", "verify"]
|
|
183
|
+
);
|
|
184
|
+
}
|
|
185
|
+
async function computeHMAC(data, key) {
|
|
186
|
+
if (typeof crypto === "undefined" || !crypto.subtle) {
|
|
187
|
+
throw new Error("Web Crypto API is not available");
|
|
188
|
+
}
|
|
189
|
+
const buffer = typeof data === "string" ? new TextEncoder().encode(data) : data;
|
|
190
|
+
const signature = await crypto.subtle.sign("HMAC", key, buffer);
|
|
191
|
+
return base64Encode(signature);
|
|
192
|
+
}
|
|
193
|
+
async function verifyHMAC(data, signature, key) {
|
|
194
|
+
if (typeof crypto === "undefined" || !crypto.subtle) {
|
|
195
|
+
throw new Error("Web Crypto API is not available");
|
|
196
|
+
}
|
|
197
|
+
try {
|
|
198
|
+
const dataBuffer = typeof data === "string" ? new TextEncoder().encode(data) : data;
|
|
199
|
+
const signatureBuffer = new Uint8Array(
|
|
200
|
+
atob(signature).split("").map((char) => char.charCodeAt(0))
|
|
201
|
+
);
|
|
202
|
+
return await crypto.subtle.verify("HMAC", key, signatureBuffer, dataBuffer);
|
|
203
|
+
} catch {
|
|
204
|
+
return false;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
async function deriveKeyFromPassword(password, salt, iterations = 1e5, keyLength = 256) {
|
|
208
|
+
if (typeof crypto === "undefined" || !crypto.subtle) {
|
|
209
|
+
throw new Error("Web Crypto API is not available");
|
|
210
|
+
}
|
|
211
|
+
const saltBuffer = typeof salt === "string" ? new TextEncoder().encode(salt) : salt;
|
|
212
|
+
const passwordKey = await crypto.subtle.importKey(
|
|
213
|
+
"raw",
|
|
214
|
+
new TextEncoder().encode(password),
|
|
215
|
+
"PBKDF2",
|
|
216
|
+
false,
|
|
217
|
+
["deriveBits", "deriveKey"]
|
|
218
|
+
);
|
|
219
|
+
return crypto.subtle.deriveKey(
|
|
220
|
+
{
|
|
221
|
+
name: "PBKDF2",
|
|
222
|
+
salt: saltBuffer,
|
|
223
|
+
iterations,
|
|
224
|
+
hash: "SHA-256"
|
|
225
|
+
},
|
|
226
|
+
passwordKey,
|
|
227
|
+
{
|
|
228
|
+
name: "AES-GCM",
|
|
229
|
+
length: keyLength
|
|
230
|
+
},
|
|
231
|
+
false,
|
|
232
|
+
["encrypt", "decrypt"]
|
|
233
|
+
);
|
|
234
|
+
}
|
|
235
|
+
async function aesGCMEncrypt(data, key) {
|
|
236
|
+
if (typeof crypto === "undefined" || !crypto.subtle) {
|
|
237
|
+
throw new Error("Web Crypto API is not available");
|
|
238
|
+
}
|
|
239
|
+
const dataBuffer = typeof data === "string" ? new TextEncoder().encode(data) : data;
|
|
240
|
+
const iv = crypto.getRandomValues(new Uint8Array(12));
|
|
241
|
+
const encrypted = await crypto.subtle.encrypt(
|
|
242
|
+
{
|
|
243
|
+
name: "AES-GCM",
|
|
244
|
+
iv
|
|
245
|
+
},
|
|
246
|
+
key,
|
|
247
|
+
dataBuffer
|
|
248
|
+
);
|
|
249
|
+
return {
|
|
250
|
+
encrypted: base64Encode(encrypted),
|
|
251
|
+
iv: base64Encode(iv.buffer)
|
|
252
|
+
};
|
|
253
|
+
}
|
|
254
|
+
async function aesGCMDecrypt(encryptedData, iv, key) {
|
|
255
|
+
if (typeof crypto === "undefined" || !crypto.subtle) {
|
|
256
|
+
throw new Error("Web Crypto API is not available");
|
|
257
|
+
}
|
|
258
|
+
const encryptedBuffer = new Uint8Array(
|
|
259
|
+
atob(encryptedData).split("").map((char) => char.charCodeAt(0))
|
|
260
|
+
);
|
|
261
|
+
const ivBuffer = new Uint8Array(
|
|
262
|
+
atob(iv).split("").map((char) => char.charCodeAt(0))
|
|
263
|
+
);
|
|
264
|
+
const decrypted = await crypto.subtle.decrypt(
|
|
265
|
+
{
|
|
266
|
+
name: "AES-GCM",
|
|
267
|
+
iv: ivBuffer
|
|
268
|
+
},
|
|
269
|
+
key,
|
|
270
|
+
encryptedBuffer
|
|
271
|
+
);
|
|
272
|
+
return new TextDecoder().decode(decrypted);
|
|
273
|
+
}
|
|
172
274
|
|
|
173
|
-
export { base64Decode, base64Encode, exportPrivateKey, exportPublicKey, generateRSAKeyPair, generateRandomString, generateUUID, hash, importPrivateKey, importPublicKey, rsaDecrypt, rsaEncrypt, sha256 };
|
|
275
|
+
export { aesGCMDecrypt, aesGCMEncrypt, base64Decode, base64Encode, computeHMAC, deriveKeyFromPassword, exportPrivateKey, exportPublicKey, generateHMACKey, generateRSAKeyPair, generateRandomString, generateUUID, hash, importPrivateKey, importPublicKey, rsaDecrypt, rsaEncrypt, sha256, verifyHMAC };
|
package/dist/data-structure.cjs
CHANGED
package/dist/data-structure.js
CHANGED
package/dist/date.cjs
CHANGED
package/dist/date.js
CHANGED
package/dist/dom.cjs
CHANGED
package/dist/dom.js
CHANGED
package/dist/file.cjs
CHANGED
package/dist/file.js
CHANGED
package/dist/i18n.cjs
CHANGED
package/dist/i18n.js
CHANGED