cipher-kit 2.1.3 → 3.0.0

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.
Files changed (52) hide show
  1. package/README.md +324 -434
  2. package/dist/chunk-3A4RTUKO.cjs +509 -0
  3. package/dist/chunk-3A4RTUKO.cjs.map +1 -0
  4. package/dist/chunk-7254PEID.cjs +502 -0
  5. package/dist/chunk-7254PEID.cjs.map +1 -0
  6. package/dist/chunk-GL32EZRA.js +475 -0
  7. package/dist/chunk-GL32EZRA.js.map +1 -0
  8. package/dist/chunk-IY6XGUYO.js +494 -0
  9. package/dist/chunk-IY6XGUYO.js.map +1 -0
  10. package/dist/chunk-VCBHSRCS.cjs +523 -0
  11. package/dist/chunk-VCBHSRCS.cjs.map +1 -0
  12. package/dist/chunk-X6MX4NDE.js +478 -0
  13. package/dist/chunk-X6MX4NDE.js.map +1 -0
  14. package/dist/export-B-3CCZIO.d.cts +389 -0
  15. package/dist/export-BPo6yPV-.d.ts +389 -0
  16. package/dist/export-C0_UEEg8.d.ts +396 -0
  17. package/dist/export-DPuocAr3.d.cts +396 -0
  18. package/dist/index.cjs +11 -19
  19. package/dist/index.cjs.map +1 -1
  20. package/dist/index.d.cts +11 -40
  21. package/dist/index.d.ts +11 -40
  22. package/dist/index.js +3 -3
  23. package/dist/index.js.map +1 -1
  24. package/dist/node.cjs +39 -35
  25. package/dist/node.d.cts +3 -3
  26. package/dist/node.d.ts +3 -3
  27. package/dist/node.js +2 -2
  28. package/dist/validate-vDTesb-X.d.cts +195 -0
  29. package/dist/validate-vDTesb-X.d.ts +195 -0
  30. package/dist/web-api.cjs +39 -35
  31. package/dist/web-api.d.cts +2 -3
  32. package/dist/web-api.d.ts +2 -3
  33. package/dist/web-api.js +2 -2
  34. package/package.json +82 -92
  35. package/dist/chunk-BMX42IZM.cjs +0 -623
  36. package/dist/chunk-BMX42IZM.cjs.map +0 -1
  37. package/dist/chunk-HTRGOBZF.cjs +0 -169
  38. package/dist/chunk-HTRGOBZF.cjs.map +0 -1
  39. package/dist/chunk-LU7QOSQH.js +0 -141
  40. package/dist/chunk-LU7QOSQH.js.map +0 -1
  41. package/dist/chunk-S6SNCTU6.js +0 -485
  42. package/dist/chunk-S6SNCTU6.js.map +0 -1
  43. package/dist/chunk-T36BEDPY.js +0 -598
  44. package/dist/chunk-T36BEDPY.js.map +0 -1
  45. package/dist/chunk-ZNM5M6RD.cjs +0 -514
  46. package/dist/chunk-ZNM5M6RD.cjs.map +0 -1
  47. package/dist/export-BaM_OTFk.d.ts +0 -573
  48. package/dist/export-CCTGAosO.d.ts +0 -572
  49. package/dist/export-FYHgb-8E.d.cts +0 -572
  50. package/dist/export-KFT0YyMg.d.cts +0 -573
  51. package/dist/validate-lkJAHCeJ.d.cts +0 -399
  52. package/dist/validate-lkJAHCeJ.d.ts +0 -399
@@ -0,0 +1,389 @@
1
+ import { i as DIGEST_ALGORITHMS, j as ENCRYPTION_ALGORITHMS, c as Encoding, a as CreateSecretKeyOptions, D as DecryptOptions, d as EncryptOptions, H as HashOptions, g as HashPasswordOptions, R as Result, V as VerifyPasswordOptions } from './validate-vDTesb-X.cjs';
2
+
3
+ declare const __brand: unique symbol;
4
+ type WebSecretKey = {
5
+ readonly platform: "web";
6
+ readonly digest: keyof typeof DIGEST_ALGORITHMS;
7
+ readonly algorithm: keyof typeof ENCRYPTION_ALGORITHMS;
8
+ readonly key: CryptoKey;
9
+ readonly injected: (typeof ENCRYPTION_ALGORITHMS)[keyof typeof ENCRYPTION_ALGORITHMS];
10
+ } & {
11
+ readonly [__brand]: "secretKey-web";
12
+ };
13
+
14
+ /**
15
+ * Checks whether a value is a `WebSecretKey` for the Web Crypto platform.
16
+ *
17
+ * @param x - The value to check.
18
+ * @returns `true` if `x` is a `WebSecretKey`.
19
+ *
20
+ * @example
21
+ * ```ts
22
+ * isWebSecretKey(webKey); // true
23
+ * isWebSecretKey({}); // false
24
+ * ```
25
+ */
26
+ declare function isWebSecretKey(x: unknown): x is WebSecretKey;
27
+ /**
28
+ * Generates a UUID (v4) (non-throwing).
29
+ *
30
+ * @returns `Result<string>` with the UUID or error.
31
+ * @see {@link generateUuid} For full parameter/behavior docs.
32
+ */
33
+ declare function tryGenerateUuid(): Result<string>;
34
+ /**
35
+ * Generates a cryptographically random UUID (v4).
36
+ *
37
+ * @returns A UUID string.
38
+ * @throws {Error} If UUID generation fails.
39
+ *
40
+ * @example
41
+ * ```ts
42
+ * const uuid = generateUuid();
43
+ * ```
44
+ *
45
+ * @see {@link tryGenerateUuid} Non-throwing variant returning `Result<string>`.
46
+ */
47
+ declare function generateUuid(): string;
48
+ /**
49
+ * Derives a `WebSecretKey` from a high-entropy secret (non-throwing).
50
+ *
51
+ * @returns `Promise<Result<{ result: WebSecretKey }>>` with the derived key or error.
52
+ * @see {@link createSecretKey} For full parameter/behavior docs.
53
+ */
54
+ declare function tryCreateSecretKey(secret: string, options?: CreateSecretKeyOptions): Promise<Result<{
55
+ result: WebSecretKey;
56
+ }>>;
57
+ /**
58
+ * Derives a `WebSecretKey` from a high-entropy secret for encryption/decryption.
59
+ *
60
+ * @remarks
61
+ * Uses HKDF via the Web Crypto API to derive a symmetric key from the input string.
62
+ *
63
+ * @param secret - High-entropy secret (min 8 chars). For human-chosen passwords, use {@link hashPassword} instead.
64
+ * @param options - Key derivation options.
65
+ * @returns The derived `WebSecretKey`.
66
+ * @throws {Error} If key derivation fails.
67
+ *
68
+ * @example
69
+ * ```ts
70
+ * const secretKey = await createSecretKey("my-32-char-high-entropy-secret!!");
71
+ * ```
72
+ *
73
+ * @see {@link tryCreateSecretKey} Non-throwing variant returning `Result`.
74
+ */
75
+ declare function createSecretKey(secret: string, options?: CreateSecretKeyOptions): Promise<WebSecretKey>;
76
+ /**
77
+ * Encrypts a UTF-8 string (non-throwing).
78
+ *
79
+ * @returns `Promise<Result<string>>` with the ciphertext or error.
80
+ * @see {@link encrypt} For full parameter/behavior docs.
81
+ */
82
+ declare function tryEncrypt(data: string, secretKey: WebSecretKey, options?: EncryptOptions): Promise<Result<string>>;
83
+ /**
84
+ * Encrypts a UTF-8 string using the provided `WebSecretKey`.
85
+ *
86
+ * @remarks
87
+ * Output format: `"iv.cipher.tag."` (three dot-separated base64url segments plus trailing dot).
88
+ * Cross-platform compatible — data encrypted on Web can be decrypted on Node and vice versa.
89
+ * AES-GCM uses random 96-bit IVs. Rotate keys before ~2^32 encryptions with the same key to avoid nonce collision.
90
+ *
91
+ * @param data - UTF-8 string to encrypt. Must be a non-empty string (whitespace-only strings are rejected).
92
+ * @param secretKey - The `WebSecretKey` used for encryption.
93
+ * @param options - Encryption options.
94
+ * @returns The encrypted string.
95
+ * @throws {Error} If the input or key is invalid, or encryption fails.
96
+ *
97
+ * @example
98
+ * ```ts
99
+ * const secretKey = await createSecretKey("my-secret");
100
+ * const encrypted = await encrypt("Hello, World!", secretKey);
101
+ * ```
102
+ *
103
+ * @see {@link tryEncrypt} Non-throwing variant returning `Result<string>`.
104
+ */
105
+ declare function encrypt(data: string, secretKey: WebSecretKey, options?: EncryptOptions): Promise<string>;
106
+ /**
107
+ * Decrypts a ciphertext string (non-throwing).
108
+ *
109
+ * @returns `Promise<Result<string>>` with the plaintext or error.
110
+ * @see {@link decrypt} For full parameter/behavior docs.
111
+ */
112
+ declare function tryDecrypt(encrypted: string, secretKey: WebSecretKey, options?: DecryptOptions): Promise<Result<string>>;
113
+ /**
114
+ * Decrypts a ciphertext string using the provided `WebSecretKey`.
115
+ *
116
+ * @remarks
117
+ * Expects input in the format `"iv.cipher.tag."`.
118
+ * Cross-platform compatible — data encrypted on Node can be decrypted on Web and vice versa.
119
+ *
120
+ * @param encrypted - The encrypted string to decrypt.
121
+ * @param secretKey - The `WebSecretKey` used for decryption.
122
+ * @param options - Decryption options.
123
+ * @returns The decrypted UTF-8 string.
124
+ * @throws {Error} If the input or key is invalid, or decryption fails.
125
+ *
126
+ * @example
127
+ * ```ts
128
+ * const secretKey = await createSecretKey("my-secret");
129
+ * const encrypted = await encrypt("Hello, World!", secretKey);
130
+ * const decrypted = await decrypt(encrypted, secretKey); // "Hello, World!"
131
+ * ```
132
+ *
133
+ * @see {@link tryDecrypt} Non-throwing variant returning `Result<string>`.
134
+ */
135
+ declare function decrypt(encrypted: string, secretKey: WebSecretKey, options?: DecryptOptions): Promise<string>;
136
+ /**
137
+ * Encrypts a plain object (non-throwing).
138
+ *
139
+ * @returns `Promise<Result<string>>` with the ciphertext or error.
140
+ * @see {@link encryptObj} For full parameter/behavior docs.
141
+ */
142
+ declare function tryEncryptObj<T extends object = Record<string, unknown>>(obj: T, secretKey: WebSecretKey, options?: EncryptOptions): Promise<Result<string>>;
143
+ /**
144
+ * Encrypts a plain object using the provided `WebSecretKey`.
145
+ *
146
+ * @remarks
147
+ * Only plain objects (POJOs) are accepted; class instances, Maps, Sets, etc. are rejected.
148
+ * Output format: `"iv.cipher.tag."`.
149
+ *
150
+ * @param obj - Plain object to encrypt.
151
+ * @param secretKey - The `WebSecretKey` used for encryption.
152
+ * @param options - Encryption options.
153
+ * @returns The encrypted string.
154
+ * @throws {Error} If the input or key is invalid, or encryption fails.
155
+ *
156
+ * @example
157
+ * ```ts
158
+ * const secretKey = await createSecretKey("my-secret");
159
+ * const encrypted = await encryptObj({ a: 1 }, secretKey);
160
+ * ```
161
+ *
162
+ * @see {@link tryEncryptObj} Non-throwing variant returning `Result<string>`.
163
+ */
164
+ declare function encryptObj<T extends object = Record<string, unknown>>(obj: T, secretKey: WebSecretKey, options?: EncryptOptions): Promise<string>;
165
+ /**
166
+ * Decrypts an encrypted JSON string into a plain object (non-throwing).
167
+ *
168
+ * @returns `Promise<Result<{ result: T }>>` with the object or error.
169
+ * @see {@link decryptObj} For full parameter/behavior docs.
170
+ */
171
+ declare function tryDecryptObj<T extends object = Record<string, unknown>>(encrypted: string, secretKey: WebSecretKey, options?: DecryptOptions): Promise<Result<{
172
+ result: T;
173
+ }>>;
174
+ /**
175
+ * Decrypts an encrypted JSON string into a plain object.
176
+ *
177
+ * @remarks
178
+ * Expects input in the format `"iv.cipher.tag."`.
179
+ *
180
+ * @param encrypted - The encrypted string.
181
+ * @param secretKey - The `WebSecretKey` used for decryption.
182
+ * @param options - Decryption options.
183
+ * @returns The decrypted object.
184
+ * @throws {Error} If decryption or JSON parsing fails.
185
+ *
186
+ * @example
187
+ * ```ts
188
+ * const secretKey = await createSecretKey("my-secret");
189
+ * const encrypted = await encryptObj({ a: 1 }, secretKey);
190
+ * const obj = await decryptObj<{ a: number }>(encrypted, secretKey); // obj.a === 1
191
+ * ```
192
+ *
193
+ * @see {@link tryDecryptObj} Non-throwing variant returning `Result`.
194
+ */
195
+ declare function decryptObj<T extends object = Record<string, unknown>>(encrypted: string, secretKey: WebSecretKey, options?: DecryptOptions): Promise<T>;
196
+ /**
197
+ * Hashes a UTF-8 string (non-throwing).
198
+ *
199
+ * @returns `Promise<Result<string>>` with the hash or error.
200
+ * @see {@link hash} For full parameter/behavior docs.
201
+ */
202
+ declare function tryHash(data: string, options?: HashOptions): Promise<Result<string>>;
203
+ /**
204
+ * Hashes a UTF-8 string using the specified digest algorithm.
205
+ *
206
+ * @param data - The input string to hash.
207
+ * @param options - Hash options.
208
+ * @returns The hashed string.
209
+ * @throws {Error} If input is invalid or hashing fails.
210
+ *
211
+ * @example
212
+ * ```ts
213
+ * const hashed = await hash("my data");
214
+ * ```
215
+ *
216
+ * @see {@link tryHash} Non-throwing variant returning `Result<string>`.
217
+ */
218
+ declare function hash(data: string, options?: HashOptions): Promise<string>;
219
+ /**
220
+ * Hashes a password using PBKDF2 (non-throwing).
221
+ *
222
+ * @returns `Promise<Result<{ result: string; salt: string }>>` with the hash/salt or error.
223
+ * @see {@link hashPassword} For full parameter/behavior docs.
224
+ */
225
+ declare function tryHashPassword(password: string, options?: HashPasswordOptions): Promise<Result<{
226
+ result: string;
227
+ salt: string;
228
+ }>>;
229
+ /**
230
+ * Hashes a password using PBKDF2.
231
+ *
232
+ * @remarks
233
+ * Defaults: `sha512`, 320 000 iterations, 64-byte key, 16-byte random salt.
234
+ *
235
+ * @param password - The password to hash.
236
+ * @param options - Password hashing options.
237
+ * @returns `{ result, salt }` for storage.
238
+ * @throws {Error} If inputs are invalid or hashing fails.
239
+ *
240
+ * @example
241
+ * ```ts
242
+ * const { result, salt } = await hashPassword("my-password");
243
+ * ```
244
+ *
245
+ * @see {@link tryHashPassword} Non-throwing variant returning `Result`.
246
+ */
247
+ declare function hashPassword(password: string, options?: HashPasswordOptions): Promise<{
248
+ result: string;
249
+ salt: string;
250
+ }>;
251
+ /**
252
+ * Verifies a password against a stored PBKDF2 hash (non-throwing).
253
+ *
254
+ * @returns `Promise<Result<boolean>>` — `true` if the password matches, `false` if not, or an error for invalid inputs/options.
255
+ * @see {@link verifyPassword} For full parameter/behavior docs.
256
+ */
257
+ declare function tryVerifyPassword(password: string, hashedPassword: string, salt: string, options?: VerifyPasswordOptions): Promise<Result<boolean>>;
258
+ /**
259
+ * Verifies a password against a stored PBKDF2 hash.
260
+ *
261
+ * @remarks
262
+ * Re-derives the key with the same parameters and compares using a full-loop XOR pattern.
263
+ * This is best-effort constant-time; JS JIT optimization may introduce timing variation.
264
+ * The Web Crypto API does not expose a `timingSafeEqual` equivalent.
265
+ * For timing-critical deployments, prefer the Node implementation which uses `crypto.timingSafeEqual`.
266
+ * Throws for invalid inputs/options (bad encoding, wrong parameters, non-decodable salt/hash).
267
+ * Returns `false` for password mismatch or length-mismatched hash.
268
+ *
269
+ * @param password - The plain password to verify.
270
+ * @param hashedPassword - The stored hash (encoded).
271
+ * @param salt - The stored salt (encoded).
272
+ * @param options - Verification options (must match the parameters used to hash).
273
+ * @returns `true` if the password matches, otherwise `false`.
274
+ * @throws {Error} If verification input/options are invalid.
275
+ *
276
+ * @example
277
+ * ```ts
278
+ * const { result, salt } = await hashPassword("my-password");
279
+ * await verifyPassword("my-password", result, salt); // true
280
+ * await verifyPassword("wrong-password", result, salt); // false
281
+ * ```
282
+ *
283
+ * @see {@link tryVerifyPassword} Non-throwing variant returning `Result<boolean>`.
284
+ */
285
+ declare function verifyPassword(password: string, hashedPassword: string, salt: string, options?: VerifyPasswordOptions): Promise<boolean>;
286
+ /**
287
+ * Converts a string to a `Uint8Array` (non-throwing).
288
+ *
289
+ * @returns `Result<{ result: Uint8Array<ArrayBuffer> }>` with the bytes or error.
290
+ * @see {@link convertStrToBytes} For full parameter/behavior docs.
291
+ */
292
+ declare function tryConvertStrToBytes(data: string, inputEncoding?: Encoding): Result<{
293
+ result: Uint8Array<ArrayBuffer>;
294
+ }>;
295
+ /**
296
+ * Converts a string to a `Uint8Array` using the specified encoding.
297
+ *
298
+ * @param data - The input string to convert.
299
+ * @param inputEncoding - Source encoding (default: `'utf8'`).
300
+ * @returns A `Uint8Array` containing the bytes.
301
+ * @throws {Error} If input is invalid or conversion fails.
302
+ *
303
+ * @example
304
+ * ```ts
305
+ * const bytes = convertStrToBytes("Hello", "utf8");
306
+ * ```
307
+ *
308
+ * @see {@link tryConvertStrToBytes} Non-throwing variant returning `Result`.
309
+ */
310
+ declare function convertStrToBytes(data: string, inputEncoding?: Encoding): Uint8Array<ArrayBuffer>;
311
+ /**
312
+ * Converts a `Uint8Array` or `ArrayBuffer` to a string (non-throwing).
313
+ *
314
+ * @returns `Result<string>` with the encoded string or error.
315
+ * @see {@link convertBytesToStr} For full parameter/behavior docs.
316
+ */
317
+ declare function tryConvertBytesToStr(data: Uint8Array | ArrayBuffer, outputEncoding?: Encoding): Result<string>;
318
+ /**
319
+ * Converts a `Uint8Array` or `ArrayBuffer` to a string using the specified encoding.
320
+ *
321
+ * @param data - The bytes to convert.
322
+ * @param outputEncoding - Target encoding (default: `'utf8'`).
323
+ * @returns The encoded string.
324
+ * @throws {Error} If input is invalid or conversion fails.
325
+ *
326
+ * @example
327
+ * ```ts
328
+ * const bytes = convertStrToBytes("Hello", "utf8");
329
+ * const str = convertBytesToStr(bytes, "utf8"); // "Hello"
330
+ * ```
331
+ *
332
+ * @see {@link tryConvertBytesToStr} Non-throwing variant returning `Result<string>`.
333
+ */
334
+ declare function convertBytesToStr(data: Uint8Array | ArrayBuffer, outputEncoding?: Encoding): string;
335
+ /**
336
+ * Converts text between encodings (non-throwing).
337
+ *
338
+ * @returns `Result<string>` with the re-encoded string or error.
339
+ * @see {@link convertEncoding} For full parameter/behavior docs.
340
+ */
341
+ declare function tryConvertEncoding(data: string, from: Encoding, to: Encoding): Result<string>;
342
+ /**
343
+ * Converts text between encodings.
344
+ *
345
+ * @param data - The input string.
346
+ * @param from - Current encoding of `data`.
347
+ * @param to - Target encoding.
348
+ * @returns The re-encoded string.
349
+ * @throws {Error} If encodings are invalid or conversion fails.
350
+ *
351
+ * @example
352
+ * ```ts
353
+ * const encoded = convertEncoding("Hello", "utf8", "base64url");
354
+ * ```
355
+ *
356
+ * @see {@link tryConvertEncoding} Non-throwing variant returning `Result<string>`.
357
+ */
358
+ declare function convertEncoding(data: string, from: Encoding, to: Encoding): string;
359
+
360
+ declare const webCryptoKit_convertBytesToStr: typeof convertBytesToStr;
361
+ declare const webCryptoKit_convertEncoding: typeof convertEncoding;
362
+ declare const webCryptoKit_convertStrToBytes: typeof convertStrToBytes;
363
+ declare const webCryptoKit_createSecretKey: typeof createSecretKey;
364
+ declare const webCryptoKit_decrypt: typeof decrypt;
365
+ declare const webCryptoKit_decryptObj: typeof decryptObj;
366
+ declare const webCryptoKit_encrypt: typeof encrypt;
367
+ declare const webCryptoKit_encryptObj: typeof encryptObj;
368
+ declare const webCryptoKit_generateUuid: typeof generateUuid;
369
+ declare const webCryptoKit_hash: typeof hash;
370
+ declare const webCryptoKit_hashPassword: typeof hashPassword;
371
+ declare const webCryptoKit_isWebSecretKey: typeof isWebSecretKey;
372
+ declare const webCryptoKit_tryConvertBytesToStr: typeof tryConvertBytesToStr;
373
+ declare const webCryptoKit_tryConvertEncoding: typeof tryConvertEncoding;
374
+ declare const webCryptoKit_tryConvertStrToBytes: typeof tryConvertStrToBytes;
375
+ declare const webCryptoKit_tryCreateSecretKey: typeof tryCreateSecretKey;
376
+ declare const webCryptoKit_tryDecrypt: typeof tryDecrypt;
377
+ declare const webCryptoKit_tryDecryptObj: typeof tryDecryptObj;
378
+ declare const webCryptoKit_tryEncrypt: typeof tryEncrypt;
379
+ declare const webCryptoKit_tryEncryptObj: typeof tryEncryptObj;
380
+ declare const webCryptoKit_tryGenerateUuid: typeof tryGenerateUuid;
381
+ declare const webCryptoKit_tryHash: typeof tryHash;
382
+ declare const webCryptoKit_tryHashPassword: typeof tryHashPassword;
383
+ declare const webCryptoKit_tryVerifyPassword: typeof tryVerifyPassword;
384
+ declare const webCryptoKit_verifyPassword: typeof verifyPassword;
385
+ declare namespace webCryptoKit {
386
+ export { webCryptoKit_convertBytesToStr as convertBytesToStr, webCryptoKit_convertEncoding as convertEncoding, webCryptoKit_convertStrToBytes as convertStrToBytes, webCryptoKit_createSecretKey as createSecretKey, webCryptoKit_decrypt as decrypt, webCryptoKit_decryptObj as decryptObj, webCryptoKit_encrypt as encrypt, webCryptoKit_encryptObj as encryptObj, webCryptoKit_generateUuid as generateUuid, webCryptoKit_hash as hash, webCryptoKit_hashPassword as hashPassword, webCryptoKit_isWebSecretKey as isWebSecretKey, webCryptoKit_tryConvertBytesToStr as tryConvertBytesToStr, webCryptoKit_tryConvertEncoding as tryConvertEncoding, webCryptoKit_tryConvertStrToBytes as tryConvertStrToBytes, webCryptoKit_tryCreateSecretKey as tryCreateSecretKey, webCryptoKit_tryDecrypt as tryDecrypt, webCryptoKit_tryDecryptObj as tryDecryptObj, webCryptoKit_tryEncrypt as tryEncrypt, webCryptoKit_tryEncryptObj as tryEncryptObj, webCryptoKit_tryGenerateUuid as tryGenerateUuid, webCryptoKit_tryHash as tryHash, webCryptoKit_tryHashPassword as tryHashPassword, webCryptoKit_tryVerifyPassword as tryVerifyPassword, webCryptoKit_verifyPassword as verifyPassword };
387
+ }
388
+
389
+ export { type WebSecretKey as W, convertEncoding as a, convertStrToBytes as b, convertBytesToStr as c, createSecretKey as d, decrypt as e, decryptObj as f, encrypt as g, encryptObj as h, generateUuid as i, hash as j, hashPassword as k, isWebSecretKey as l, tryConvertEncoding as m, tryConvertStrToBytes as n, tryCreateSecretKey as o, tryDecrypt as p, tryDecryptObj as q, tryEncrypt as r, tryEncryptObj as s, tryConvertBytesToStr as t, tryGenerateUuid as u, tryHash as v, webCryptoKit as w, tryHashPassword as x, tryVerifyPassword as y, verifyPassword as z };