cipher-kit 2.0.0-beta.4 → 2.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 (40) hide show
  1. package/README.md +362 -99
  2. package/dist/{chunk-UIV6DG54.cjs → chunk-3UX5MZ2P.cjs} +2 -2
  3. package/dist/chunk-3UX5MZ2P.cjs.map +1 -0
  4. package/dist/{chunk-LHB5NXYW.js → chunk-4MFF6V3R.js} +3 -3
  5. package/dist/chunk-4MFF6V3R.js.map +1 -0
  6. package/dist/{chunk-N5T4PNG7.js → chunk-ACFPMIXO.js} +3 -3
  7. package/dist/chunk-ACFPMIXO.js.map +1 -0
  8. package/dist/{chunk-XIWV7XVI.cjs → chunk-CVCDAHDW.cjs} +130 -130
  9. package/dist/chunk-CVCDAHDW.cjs.map +1 -0
  10. package/dist/{chunk-YMNOTRET.js → chunk-FKSYSPJR.js} +2 -2
  11. package/dist/chunk-FKSYSPJR.js.map +1 -0
  12. package/dist/{chunk-OL2AIXWK.cjs → chunk-N2EW2FDZ.cjs} +125 -125
  13. package/dist/chunk-N2EW2FDZ.cjs.map +1 -0
  14. package/dist/{export-Gd8hafl6.d.cts → export-55tHE0Bw.d.cts} +12 -12
  15. package/dist/{export-D1Vh79Qw.d.ts → export-BMvZq46v.d.ts} +12 -12
  16. package/dist/{export-DXRl-ncG.d.cts → export-CQNsJFh_.d.cts} +12 -12
  17. package/dist/{export-DGrELdz_.d.ts → export-llM6c7Do.d.ts} +12 -12
  18. package/dist/index.cjs +11 -11
  19. package/dist/index.cjs.map +1 -1
  20. package/dist/index.d.cts +3 -3
  21. package/dist/index.d.ts +3 -3
  22. package/dist/index.js +3 -3
  23. package/dist/index.js.map +1 -1
  24. package/dist/node.cjs +32 -32
  25. package/dist/node.d.cts +2 -2
  26. package/dist/node.d.ts +2 -2
  27. package/dist/node.js +2 -2
  28. package/dist/{validate-Cb7IOrPo.d.cts → validate-EHuJC5QQ.d.cts} +19 -8
  29. package/dist/{validate-Cb7IOrPo.d.ts → validate-EHuJC5QQ.d.ts} +19 -8
  30. package/dist/web-api.cjs +32 -32
  31. package/dist/web-api.d.cts +2 -2
  32. package/dist/web-api.d.ts +2 -2
  33. package/dist/web-api.js +2 -2
  34. package/package.json +4 -3
  35. package/dist/chunk-LHB5NXYW.js.map +0 -1
  36. package/dist/chunk-N5T4PNG7.js.map +0 -1
  37. package/dist/chunk-OL2AIXWK.cjs.map +0 -1
  38. package/dist/chunk-UIV6DG54.cjs.map +0 -1
  39. package/dist/chunk-XIWV7XVI.cjs.map +0 -1
  40. package/dist/chunk-YMNOTRET.js.map +0 -1
package/dist/index.d.cts CHANGED
@@ -1,6 +1,6 @@
1
- import { n as nodeCryptoKit } from './export-DXRl-ncG.cjs';
2
- import { w as webCryptoKit } from './export-Gd8hafl6.cjs';
3
- export { C as CipherEncoding, d as CreateSecretKeyOptions, f as DecryptOptions, D as DigestAlgorithm, E as ENCRYPTED_REGEX, b as Encoding, e as EncryptOptions, c as EncryptionAlgorithm, H as HashOptions, g as HashPasswordOptions, S as SecretKey, V as VerifyPasswordOptions, m as matchPattern, p as parseToObj, s as stringifyObj, t as tryParseToObj, a as tryStringifyObj } from './validate-Cb7IOrPo.cjs';
1
+ import { n as nodeCryptoKit } from './export-CQNsJFh_.cjs';
2
+ import { w as webCryptoKit } from './export-55tHE0Bw.cjs';
3
+ export { C as CipherEncoding, d as CreateSecretKeyOptions, f as DecryptOptions, D as DigestAlgorithm, E as ENCRYPTED_REGEX, b as Encoding, e as EncryptOptions, c as EncryptionAlgorithm, H as HashOptions, g as HashPasswordOptions, S as SecretKey, V as VerifyPasswordOptions, m as matchPattern, p as parseToObj, s as stringifyObj, t as tryParseToObj, a as tryStringifyObj } from './validate-EHuJC5QQ.cjs';
4
4
  import 'node:buffer';
5
5
  import 'node:crypto';
6
6
 
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { n as nodeCryptoKit } from './export-D1Vh79Qw.js';
2
- import { w as webCryptoKit } from './export-DGrELdz_.js';
3
- export { C as CipherEncoding, d as CreateSecretKeyOptions, f as DecryptOptions, D as DigestAlgorithm, E as ENCRYPTED_REGEX, b as Encoding, e as EncryptOptions, c as EncryptionAlgorithm, H as HashOptions, g as HashPasswordOptions, S as SecretKey, V as VerifyPasswordOptions, m as matchPattern, p as parseToObj, s as stringifyObj, t as tryParseToObj, a as tryStringifyObj } from './validate-Cb7IOrPo.js';
1
+ import { n as nodeCryptoKit } from './export-BMvZq46v.js';
2
+ import { w as webCryptoKit } from './export-llM6c7Do.js';
3
+ export { C as CipherEncoding, d as CreateSecretKeyOptions, f as DecryptOptions, D as DigestAlgorithm, E as ENCRYPTED_REGEX, b as Encoding, e as EncryptOptions, c as EncryptionAlgorithm, H as HashOptions, g as HashPasswordOptions, S as SecretKey, V as VerifyPasswordOptions, m as matchPattern, p as parseToObj, s as stringifyObj, t as tryParseToObj, a as tryStringifyObj } from './validate-EHuJC5QQ.js';
4
4
  import 'node:buffer';
5
5
  import 'node:crypto';
6
6
 
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import { kit_exports } from './chunk-N5T4PNG7.js';
2
- import { kit_exports as kit_exports$1 } from './chunk-LHB5NXYW.js';
3
- export { ENCRYPTED_REGEX, matchPattern, parseToObj, stringifyObj, tryParseToObj, tryStringifyObj } from './chunk-YMNOTRET.js';
1
+ import { kit_exports } from './chunk-ACFPMIXO.js';
2
+ import { kit_exports as kit_exports$1 } from './chunk-4MFF6V3R.js';
3
+ export { ENCRYPTED_REGEX, matchPattern, parseToObj, stringifyObj, tryParseToObj, tryStringifyObj } from './chunk-FKSYSPJR.js';
4
4
 
5
5
  // src/export.ts
6
6
  var nodeKit = kit_exports;
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/export.ts"],"names":["kit_exports"],"mappings":";;;;;AAoCO,IAAM,OAAA,GAAU;AAwBhB,IAAM,MAAA,GAASA","file":"index.js","sourcesContent":["import * as nodeCryptoKit from './node/kit';\r\nimport * as webCryptoKit from './web/kit';\r\n\r\nexport {\r\n parseToObj,\r\n stringifyObj,\r\n tryParseToObj,\r\n tryStringifyObj,\r\n} from '~/helpers/object';\r\nexport {\r\n ENCRYPTED_REGEX,\r\n matchPattern,\r\n} from '~/helpers/validate';\r\nexport type * from './helpers/types';\r\n\r\n/**\r\n * Node.js cryptography kit (Crypto Node.js API).\r\n *\r\n * Can be imported directly from 'cipher-kit/node' for smaller bundle size.\r\n *\r\n * - Uses Node's `crypto` module.\r\n * - Synchronous API (throwing) + safe wrappers that return `Result` (non-throwing).\r\n * - JSDoc comments with `Explain Like I'm Five` sections.\r\n *\r\n * #### Contains:\r\n * - Secret key creation from passphrase.\r\n * - Data encryption and decryption.\r\n * - Object encryption and decryption.\r\n * - Data hashing (digest).\r\n * - Password hashing and verification with time-safe comparison.\r\n * - Object serialization and deserialization (to/from JSON).\r\n * - Pattern matching to validate encrypted data format.\r\n *\r\n * ### 🍼 Explain Like I'm Five\r\n * It's like a toolkit that helps you keep your and your users' secrets safe when using Node.js.\r\n */\r\nexport const nodeKit = nodeCryptoKit;\r\n\r\n/**\r\n * Web, Deno, Bun and Cloudflare Workers cryptography kit (Crypto Web API).\r\n *\r\n * Can be imported directly from 'cipher-kit/web-api' for smaller bundle size.\r\n *\r\n * - Uses the Web Crypto API (`crypto.subtle`).\r\n * - Async API (Promise) + safe wrappers that return `Result`.\r\n * - JSDoc comments with `Explain Like I'm Five` sections.\r\n *\r\n * #### Contains:\r\n * - Secret key creation from passphrase.\r\n * - Data encryption and decryption.\r\n * - Object encryption and decryption.\r\n * - Data hashing (digest).\r\n * - Password hashing and verification with time-safe comparison.\r\n * - Object serialization and deserialization (to/from JSON).\r\n * - Pattern matching to validate encrypted data format.\r\n *\r\n * ### 🍼 Explain Like I'm Five\r\n * It's like a toolkit that helps you keep your and your users' secrets safe when using the web\r\n * or other Node.js alternatives like Deno, Bun, or Cloudflare Workers.\r\n */\r\nexport const webKit = webCryptoKit;\r\n"]}
1
+ {"version":3,"sources":["../src/export.ts"],"names":["kit_exports"],"mappings":";;;;;AAoCO,IAAM,OAAA,GAAU;AAwBhB,IAAM,MAAA,GAASA","file":"index.js","sourcesContent":["import * as nodeCryptoKit from \"./node/kit\";\r\nimport * as webCryptoKit from \"./web/kit\";\r\n\r\nexport {\r\n parseToObj,\r\n stringifyObj,\r\n tryParseToObj,\r\n tryStringifyObj,\r\n} from \"~/helpers/object\";\r\nexport {\r\n ENCRYPTED_REGEX,\r\n matchPattern,\r\n} from \"~/helpers/validate\";\r\nexport type * from \"./helpers/types\";\r\n\r\n/**\r\n * Node.js cryptography kit (Crypto Node.js API).\r\n *\r\n * Can be imported directly from 'cipher-kit/node' for smaller bundle size.\r\n *\r\n * - Uses Node's `crypto` module.\r\n * - Synchronous API (throwing) + safe wrappers that return `Result` (non-throwing).\r\n * - JSDoc comments with `Explain Like I'm Five` sections.\r\n *\r\n * #### Contains:\r\n * - Secret key creation from passphrase.\r\n * - Data encryption and decryption.\r\n * - Object encryption and decryption.\r\n * - Data hashing (digest).\r\n * - Password hashing and verification with time-safe comparison.\r\n * - Object serialization and deserialization (to/from JSON).\r\n * - Pattern matching to validate encrypted data format.\r\n *\r\n * ### 🍼 Explain Like I'm Five\r\n * It's like a toolkit that helps you keep your and your users' secrets safe when using Node.js.\r\n */\r\nexport const nodeKit = nodeCryptoKit;\r\n\r\n/**\r\n * Web, Deno, Bun and Cloudflare Workers cryptography kit (Crypto Web API).\r\n *\r\n * Can be imported directly from 'cipher-kit/web-api' for smaller bundle size.\r\n *\r\n * - Uses the Web Crypto API (`crypto.subtle`).\r\n * - Async API (Promise) + safe wrappers that return `Result`.\r\n * - JSDoc comments with `Explain Like I'm Five` sections.\r\n *\r\n * #### Contains:\r\n * - Secret key creation from passphrase.\r\n * - Data encryption and decryption.\r\n * - Object encryption and decryption.\r\n * - Data hashing (digest).\r\n * - Password hashing and verification with time-safe comparison.\r\n * - Object serialization and deserialization (to/from JSON).\r\n * - Pattern matching to validate encrypted data format.\r\n *\r\n * ### 🍼 Explain Like I'm Five\r\n * It's like a toolkit that helps you keep your and your users' secrets safe when using the web\r\n * or other Node.js alternatives like Deno, Bun, or Cloudflare Workers.\r\n */\r\nexport const webKit = webCryptoKit;\r\n"]}
package/dist/node.cjs CHANGED
@@ -1,129 +1,129 @@
1
1
  'use strict';
2
2
 
3
- var chunkOL2AIXWK_cjs = require('./chunk-OL2AIXWK.cjs');
4
- var chunkUIV6DG54_cjs = require('./chunk-UIV6DG54.cjs');
3
+ var chunkN2EW2FDZ_cjs = require('./chunk-N2EW2FDZ.cjs');
4
+ var chunk3UX5MZ2P_cjs = require('./chunk-3UX5MZ2P.cjs');
5
5
 
6
6
 
7
7
 
8
8
  Object.defineProperty(exports, "convertBytesToStr", {
9
9
  enumerable: true,
10
- get: function () { return chunkOL2AIXWK_cjs.convertBytesToStr; }
10
+ get: function () { return chunkN2EW2FDZ_cjs.convertBytesToStr; }
11
11
  });
12
12
  Object.defineProperty(exports, "convertEncoding", {
13
13
  enumerable: true,
14
- get: function () { return chunkOL2AIXWK_cjs.convertEncoding; }
14
+ get: function () { return chunkN2EW2FDZ_cjs.convertEncoding; }
15
15
  });
16
16
  Object.defineProperty(exports, "convertStrToBytes", {
17
17
  enumerable: true,
18
- get: function () { return chunkOL2AIXWK_cjs.convertStrToBytes; }
18
+ get: function () { return chunkN2EW2FDZ_cjs.convertStrToBytes; }
19
19
  });
20
20
  Object.defineProperty(exports, "createSecretKey", {
21
21
  enumerable: true,
22
- get: function () { return chunkOL2AIXWK_cjs.createSecretKey; }
22
+ get: function () { return chunkN2EW2FDZ_cjs.createSecretKey; }
23
23
  });
24
24
  Object.defineProperty(exports, "decrypt", {
25
25
  enumerable: true,
26
- get: function () { return chunkOL2AIXWK_cjs.decrypt; }
26
+ get: function () { return chunkN2EW2FDZ_cjs.decrypt; }
27
27
  });
28
28
  Object.defineProperty(exports, "decryptObj", {
29
29
  enumerable: true,
30
- get: function () { return chunkOL2AIXWK_cjs.decryptObj; }
30
+ get: function () { return chunkN2EW2FDZ_cjs.decryptObj; }
31
31
  });
32
32
  Object.defineProperty(exports, "encrypt", {
33
33
  enumerable: true,
34
- get: function () { return chunkOL2AIXWK_cjs.encrypt; }
34
+ get: function () { return chunkN2EW2FDZ_cjs.encrypt; }
35
35
  });
36
36
  Object.defineProperty(exports, "encryptObj", {
37
37
  enumerable: true,
38
- get: function () { return chunkOL2AIXWK_cjs.encryptObj; }
38
+ get: function () { return chunkN2EW2FDZ_cjs.encryptObj; }
39
39
  });
40
40
  Object.defineProperty(exports, "generateUuid", {
41
41
  enumerable: true,
42
- get: function () { return chunkOL2AIXWK_cjs.generateUuid; }
42
+ get: function () { return chunkN2EW2FDZ_cjs.generateUuid; }
43
43
  });
44
44
  Object.defineProperty(exports, "hash", {
45
45
  enumerable: true,
46
- get: function () { return chunkOL2AIXWK_cjs.hash; }
46
+ get: function () { return chunkN2EW2FDZ_cjs.hash; }
47
47
  });
48
48
  Object.defineProperty(exports, "hashPassword", {
49
49
  enumerable: true,
50
- get: function () { return chunkOL2AIXWK_cjs.hashPassword; }
50
+ get: function () { return chunkN2EW2FDZ_cjs.hashPassword; }
51
51
  });
52
52
  Object.defineProperty(exports, "isNodeSecretKey", {
53
53
  enumerable: true,
54
- get: function () { return chunkOL2AIXWK_cjs.isNodeSecretKey; }
54
+ get: function () { return chunkN2EW2FDZ_cjs.isNodeSecretKey; }
55
55
  });
56
56
  Object.defineProperty(exports, "tryConvertBytesToStr", {
57
57
  enumerable: true,
58
- get: function () { return chunkOL2AIXWK_cjs.tryConvertBytesToStr; }
58
+ get: function () { return chunkN2EW2FDZ_cjs.tryConvertBytesToStr; }
59
59
  });
60
60
  Object.defineProperty(exports, "tryConvertEncoding", {
61
61
  enumerable: true,
62
- get: function () { return chunkOL2AIXWK_cjs.tryConvertEncoding; }
62
+ get: function () { return chunkN2EW2FDZ_cjs.tryConvertEncoding; }
63
63
  });
64
64
  Object.defineProperty(exports, "tryConvertStrToBytes", {
65
65
  enumerable: true,
66
- get: function () { return chunkOL2AIXWK_cjs.tryConvertStrToBytes; }
66
+ get: function () { return chunkN2EW2FDZ_cjs.tryConvertStrToBytes; }
67
67
  });
68
68
  Object.defineProperty(exports, "tryCreateSecretKey", {
69
69
  enumerable: true,
70
- get: function () { return chunkOL2AIXWK_cjs.tryCreateSecretKey; }
70
+ get: function () { return chunkN2EW2FDZ_cjs.tryCreateSecretKey; }
71
71
  });
72
72
  Object.defineProperty(exports, "tryDecrypt", {
73
73
  enumerable: true,
74
- get: function () { return chunkOL2AIXWK_cjs.tryDecrypt; }
74
+ get: function () { return chunkN2EW2FDZ_cjs.tryDecrypt; }
75
75
  });
76
76
  Object.defineProperty(exports, "tryDecryptObj", {
77
77
  enumerable: true,
78
- get: function () { return chunkOL2AIXWK_cjs.tryDecryptObj; }
78
+ get: function () { return chunkN2EW2FDZ_cjs.tryDecryptObj; }
79
79
  });
80
80
  Object.defineProperty(exports, "tryEncrypt", {
81
81
  enumerable: true,
82
- get: function () { return chunkOL2AIXWK_cjs.tryEncrypt; }
82
+ get: function () { return chunkN2EW2FDZ_cjs.tryEncrypt; }
83
83
  });
84
84
  Object.defineProperty(exports, "tryEncryptObj", {
85
85
  enumerable: true,
86
- get: function () { return chunkOL2AIXWK_cjs.tryEncryptObj; }
86
+ get: function () { return chunkN2EW2FDZ_cjs.tryEncryptObj; }
87
87
  });
88
88
  Object.defineProperty(exports, "tryGenerateUuid", {
89
89
  enumerable: true,
90
- get: function () { return chunkOL2AIXWK_cjs.tryGenerateUuid; }
90
+ get: function () { return chunkN2EW2FDZ_cjs.tryGenerateUuid; }
91
91
  });
92
92
  Object.defineProperty(exports, "tryHash", {
93
93
  enumerable: true,
94
- get: function () { return chunkOL2AIXWK_cjs.tryHash; }
94
+ get: function () { return chunkN2EW2FDZ_cjs.tryHash; }
95
95
  });
96
96
  Object.defineProperty(exports, "tryHashPassword", {
97
97
  enumerable: true,
98
- get: function () { return chunkOL2AIXWK_cjs.tryHashPassword; }
98
+ get: function () { return chunkN2EW2FDZ_cjs.tryHashPassword; }
99
99
  });
100
100
  Object.defineProperty(exports, "verifyPassword", {
101
101
  enumerable: true,
102
- get: function () { return chunkOL2AIXWK_cjs.verifyPassword; }
102
+ get: function () { return chunkN2EW2FDZ_cjs.verifyPassword; }
103
103
  });
104
104
  Object.defineProperty(exports, "ENCRYPTED_REGEX", {
105
105
  enumerable: true,
106
- get: function () { return chunkUIV6DG54_cjs.ENCRYPTED_REGEX; }
106
+ get: function () { return chunk3UX5MZ2P_cjs.ENCRYPTED_REGEX; }
107
107
  });
108
108
  Object.defineProperty(exports, "matchPattern", {
109
109
  enumerable: true,
110
- get: function () { return chunkUIV6DG54_cjs.matchPattern; }
110
+ get: function () { return chunk3UX5MZ2P_cjs.matchPattern; }
111
111
  });
112
112
  Object.defineProperty(exports, "parseToObj", {
113
113
  enumerable: true,
114
- get: function () { return chunkUIV6DG54_cjs.parseToObj; }
114
+ get: function () { return chunk3UX5MZ2P_cjs.parseToObj; }
115
115
  });
116
116
  Object.defineProperty(exports, "stringifyObj", {
117
117
  enumerable: true,
118
- get: function () { return chunkUIV6DG54_cjs.stringifyObj; }
118
+ get: function () { return chunk3UX5MZ2P_cjs.stringifyObj; }
119
119
  });
120
120
  Object.defineProperty(exports, "tryParseToObj", {
121
121
  enumerable: true,
122
- get: function () { return chunkUIV6DG54_cjs.tryParseToObj; }
122
+ get: function () { return chunk3UX5MZ2P_cjs.tryParseToObj; }
123
123
  });
124
124
  Object.defineProperty(exports, "tryStringifyObj", {
125
125
  enumerable: true,
126
- get: function () { return chunkUIV6DG54_cjs.tryStringifyObj; }
126
+ get: function () { return chunk3UX5MZ2P_cjs.tryStringifyObj; }
127
127
  });
128
128
  //# sourceMappingURL=node.cjs.map
129
129
  //# sourceMappingURL=node.cjs.map
package/dist/node.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- export { C as CipherEncoding, d as CreateSecretKeyOptions, f as DecryptOptions, D as DigestAlgorithm, E as ENCRYPTED_REGEX, b as Encoding, e as EncryptOptions, c as EncryptionAlgorithm, H as HashOptions, g as HashPasswordOptions, S as SecretKey, V as VerifyPasswordOptions, m as matchPattern, p as parseToObj, s as stringifyObj, t as tryParseToObj, a as tryStringifyObj } from './validate-Cb7IOrPo.cjs';
2
- export { w as convertBytesToStr, y as convertEncoding, s as convertStrToBytes, c as createSecretKey, f as decrypt, l as decryptObj, e as encrypt, j as encryptObj, g as generateUuid, o as hash, q as hashPassword, i as isNodeSecretKey, u as tryConvertBytesToStr, x as tryConvertEncoding, r as tryConvertStrToBytes, a as tryCreateSecretKey, d as tryDecrypt, k as tryDecryptObj, b as tryEncrypt, h as tryEncryptObj, t as tryGenerateUuid, m as tryHash, p as tryHashPassword, v as verifyPassword } from './export-DXRl-ncG.cjs';
1
+ export { C as CipherEncoding, d as CreateSecretKeyOptions, f as DecryptOptions, D as DigestAlgorithm, E as ENCRYPTED_REGEX, b as Encoding, e as EncryptOptions, c as EncryptionAlgorithm, H as HashOptions, g as HashPasswordOptions, S as SecretKey, V as VerifyPasswordOptions, m as matchPattern, p as parseToObj, s as stringifyObj, t as tryParseToObj, a as tryStringifyObj } from './validate-EHuJC5QQ.cjs';
2
+ export { w as convertBytesToStr, y as convertEncoding, s as convertStrToBytes, c as createSecretKey, f as decrypt, l as decryptObj, e as encrypt, j as encryptObj, g as generateUuid, o as hash, q as hashPassword, i as isNodeSecretKey, u as tryConvertBytesToStr, x as tryConvertEncoding, r as tryConvertStrToBytes, a as tryCreateSecretKey, d as tryDecrypt, k as tryDecryptObj, b as tryEncrypt, h as tryEncryptObj, t as tryGenerateUuid, m as tryHash, p as tryHashPassword, v as verifyPassword } from './export-CQNsJFh_.cjs';
3
3
  import 'node:crypto';
4
4
  import 'node:buffer';
package/dist/node.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { C as CipherEncoding, d as CreateSecretKeyOptions, f as DecryptOptions, D as DigestAlgorithm, E as ENCRYPTED_REGEX, b as Encoding, e as EncryptOptions, c as EncryptionAlgorithm, H as HashOptions, g as HashPasswordOptions, S as SecretKey, V as VerifyPasswordOptions, m as matchPattern, p as parseToObj, s as stringifyObj, t as tryParseToObj, a as tryStringifyObj } from './validate-Cb7IOrPo.js';
2
- export { w as convertBytesToStr, y as convertEncoding, s as convertStrToBytes, c as createSecretKey, f as decrypt, l as decryptObj, e as encrypt, j as encryptObj, g as generateUuid, o as hash, q as hashPassword, i as isNodeSecretKey, u as tryConvertBytesToStr, x as tryConvertEncoding, r as tryConvertStrToBytes, a as tryCreateSecretKey, d as tryDecrypt, k as tryDecryptObj, b as tryEncrypt, h as tryEncryptObj, t as tryGenerateUuid, m as tryHash, p as tryHashPassword, v as verifyPassword } from './export-D1Vh79Qw.js';
1
+ export { C as CipherEncoding, d as CreateSecretKeyOptions, f as DecryptOptions, D as DigestAlgorithm, E as ENCRYPTED_REGEX, b as Encoding, e as EncryptOptions, c as EncryptionAlgorithm, H as HashOptions, g as HashPasswordOptions, S as SecretKey, V as VerifyPasswordOptions, m as matchPattern, p as parseToObj, s as stringifyObj, t as tryParseToObj, a as tryStringifyObj } from './validate-EHuJC5QQ.js';
2
+ export { w as convertBytesToStr, y as convertEncoding, s as convertStrToBytes, c as createSecretKey, f as decrypt, l as decryptObj, e as encrypt, j as encryptObj, g as generateUuid, o as hash, q as hashPassword, i as isNodeSecretKey, u as tryConvertBytesToStr, x as tryConvertEncoding, r as tryConvertStrToBytes, a as tryCreateSecretKey, d as tryDecrypt, k as tryDecryptObj, b as tryEncrypt, h as tryEncryptObj, t as tryGenerateUuid, m as tryHash, p as tryHashPassword, v as verifyPassword } from './export-BMvZq46v.js';
3
3
  import 'node:crypto';
4
4
  import 'node:buffer';
package/dist/node.js CHANGED
@@ -1,4 +1,4 @@
1
- export { convertBytesToStr, convertEncoding, convertStrToBytes, createSecretKey, decrypt, decryptObj, encrypt, encryptObj, generateUuid, hash, hashPassword, isNodeSecretKey, tryConvertBytesToStr, tryConvertEncoding, tryConvertStrToBytes, tryCreateSecretKey, tryDecrypt, tryDecryptObj, tryEncrypt, tryEncryptObj, tryGenerateUuid, tryHash, tryHashPassword, verifyPassword } from './chunk-N5T4PNG7.js';
2
- export { ENCRYPTED_REGEX, matchPattern, parseToObj, stringifyObj, tryParseToObj, tryStringifyObj } from './chunk-YMNOTRET.js';
1
+ export { convertBytesToStr, convertEncoding, convertStrToBytes, createSecretKey, decrypt, decryptObj, encrypt, encryptObj, generateUuid, hash, hashPassword, isNodeSecretKey, tryConvertBytesToStr, tryConvertEncoding, tryConvertStrToBytes, tryCreateSecretKey, tryDecrypt, tryDecryptObj, tryEncrypt, tryEncryptObj, tryGenerateUuid, tryHash, tryHashPassword, verifyPassword } from './chunk-ACFPMIXO.js';
2
+ export { ENCRYPTED_REGEX, matchPattern, parseToObj, stringifyObj, tryParseToObj, tryStringifyObj } from './chunk-FKSYSPJR.js';
3
3
  //# sourceMappingURL=node.js.map
4
4
  //# sourceMappingURL=node.js.map
@@ -20,16 +20,18 @@ interface ResultErr {
20
20
  * @example
21
21
  * ```ts
22
22
  * // Primitive result
23
- * function getNum(): Result<number> { return $ok(42); }
23
+ * function getNum(): Result<number> {
24
+ * return $ok(42);
25
+ * }
24
26
  * const r1 = getNum();
25
27
  * if (r1.success) console.log(r1.result); // 42
26
28
  *
27
29
  * // Object result (spread)
28
- * function getPair(): Result<{ a: number; b: string }> {
29
- * return $ok({ a: 1, b: 'x' });
30
+ * function getObject(): Result<{ name: string; age: number }> {
31
+ * return $ok({ name: 'Alice', age: 30 });
30
32
  * }
31
- * const r2 = getPair();
32
- * if (r2.success) console.log(r2.a, r2.b); // 1 'x'
33
+ * const r2 = getObject();
34
+ * if (r2.success) console.log(r2.name, r2.age); // 'Alice' 30
33
35
  * ```
34
36
  */
35
37
  type Result<T, E = ResultErr> = T extends object ? ({
@@ -90,6 +92,7 @@ declare const ENCRYPTION_ALGORITHMS: Readonly<{
90
92
  }>;
91
93
 
92
94
  declare const __brand: unique symbol;
95
+ /** A brand type to distinguish between different types */
93
96
  type Brand<T> = {
94
97
  readonly [__brand]: T;
95
98
  };
@@ -102,11 +105,15 @@ type Brand<T> = {
102
105
  *
103
106
  * @template Platform - 'web' or 'node' to specify the platform of the secret key.
104
107
  */
105
- type SecretKey<Platform extends 'web' | 'node'> = {
108
+ type SecretKey<Platform extends "web" | "node"> = {
109
+ /** The platform the key is for ('web' or 'node'). */
106
110
  readonly platform: Platform;
111
+ /** The digest algorithm used for HKDF (e.g. 'sha256'). */
107
112
  readonly digest: keyof typeof DIGEST_ALGORITHMS;
113
+ /** The encryption algorithm used (e.g. 'aes256gcm'). */
108
114
  readonly algorithm: keyof typeof ENCRYPTION_ALGORITHMS;
109
- readonly key: Platform extends 'web' ? webcrypto.CryptoKey : nodeCrypto.KeyObject;
115
+ /** The actual secret key object (CryptoKey for web, KeyObject for node). */
116
+ readonly key: Platform extends "web" ? webcrypto.CryptoKey : nodeCrypto.KeyObject;
110
117
  } & Brand<`secretKey-${Platform}`>;
111
118
  /** Supported **cipher text** encodings for encrypted/hash outputs. */
112
119
  type CipherEncoding = (typeof CIPHER_ENCODING)[number];
@@ -130,9 +137,13 @@ type DigestAlgorithm = keyof typeof DIGEST_ALGORITHMS;
130
137
  * - `info` (default: `'cipher-kit'`)
131
138
  */
132
139
  interface CreateSecretKeyOptions {
140
+ /** Encryption algorithm to use (default: `'aes256gcm'`). */
133
141
  algorithm?: EncryptionAlgorithm;
142
+ /** Digest algorithm for HKDF (default: `'sha256'`). */
134
143
  digest?: DigestAlgorithm;
144
+ /** Optional salt for HKDF (default: `'cipher-kit-salt'`, must be ≥ 8 characters). */
135
145
  salt?: string;
146
+ /** Optional context info for HKDF (default: `'cipher-kit'`). */
136
147
  info?: string;
137
148
  }
138
149
  /**
@@ -368,6 +379,6 @@ declare const ENCRYPTED_REGEX: Readonly<{
368
379
  * matchPattern("abc.def.ghi.", "general"); // true
369
380
  * ```
370
381
  */
371
- declare function matchPattern(data: string, format: 'general' | 'node' | 'web'): boolean;
382
+ declare function matchPattern(data: string, format: "general" | "node" | "web"): boolean;
372
383
 
373
384
  export { type CipherEncoding as C, type DigestAlgorithm as D, ENCRYPTED_REGEX as E, type HashOptions as H, type Result as R, type SecretKey as S, type VerifyPasswordOptions as V, tryStringifyObj as a, type Encoding as b, type EncryptionAlgorithm as c, type CreateSecretKeyOptions as d, type EncryptOptions as e, type DecryptOptions as f, type HashPasswordOptions as g, matchPattern as m, parseToObj as p, stringifyObj as s, tryParseToObj as t };
@@ -20,16 +20,18 @@ interface ResultErr {
20
20
  * @example
21
21
  * ```ts
22
22
  * // Primitive result
23
- * function getNum(): Result<number> { return $ok(42); }
23
+ * function getNum(): Result<number> {
24
+ * return $ok(42);
25
+ * }
24
26
  * const r1 = getNum();
25
27
  * if (r1.success) console.log(r1.result); // 42
26
28
  *
27
29
  * // Object result (spread)
28
- * function getPair(): Result<{ a: number; b: string }> {
29
- * return $ok({ a: 1, b: 'x' });
30
+ * function getObject(): Result<{ name: string; age: number }> {
31
+ * return $ok({ name: 'Alice', age: 30 });
30
32
  * }
31
- * const r2 = getPair();
32
- * if (r2.success) console.log(r2.a, r2.b); // 1 'x'
33
+ * const r2 = getObject();
34
+ * if (r2.success) console.log(r2.name, r2.age); // 'Alice' 30
33
35
  * ```
34
36
  */
35
37
  type Result<T, E = ResultErr> = T extends object ? ({
@@ -90,6 +92,7 @@ declare const ENCRYPTION_ALGORITHMS: Readonly<{
90
92
  }>;
91
93
 
92
94
  declare const __brand: unique symbol;
95
+ /** A brand type to distinguish between different types */
93
96
  type Brand<T> = {
94
97
  readonly [__brand]: T;
95
98
  };
@@ -102,11 +105,15 @@ type Brand<T> = {
102
105
  *
103
106
  * @template Platform - 'web' or 'node' to specify the platform of the secret key.
104
107
  */
105
- type SecretKey<Platform extends 'web' | 'node'> = {
108
+ type SecretKey<Platform extends "web" | "node"> = {
109
+ /** The platform the key is for ('web' or 'node'). */
106
110
  readonly platform: Platform;
111
+ /** The digest algorithm used for HKDF (e.g. 'sha256'). */
107
112
  readonly digest: keyof typeof DIGEST_ALGORITHMS;
113
+ /** The encryption algorithm used (e.g. 'aes256gcm'). */
108
114
  readonly algorithm: keyof typeof ENCRYPTION_ALGORITHMS;
109
- readonly key: Platform extends 'web' ? webcrypto.CryptoKey : nodeCrypto.KeyObject;
115
+ /** The actual secret key object (CryptoKey for web, KeyObject for node). */
116
+ readonly key: Platform extends "web" ? webcrypto.CryptoKey : nodeCrypto.KeyObject;
110
117
  } & Brand<`secretKey-${Platform}`>;
111
118
  /** Supported **cipher text** encodings for encrypted/hash outputs. */
112
119
  type CipherEncoding = (typeof CIPHER_ENCODING)[number];
@@ -130,9 +137,13 @@ type DigestAlgorithm = keyof typeof DIGEST_ALGORITHMS;
130
137
  * - `info` (default: `'cipher-kit'`)
131
138
  */
132
139
  interface CreateSecretKeyOptions {
140
+ /** Encryption algorithm to use (default: `'aes256gcm'`). */
133
141
  algorithm?: EncryptionAlgorithm;
142
+ /** Digest algorithm for HKDF (default: `'sha256'`). */
134
143
  digest?: DigestAlgorithm;
144
+ /** Optional salt for HKDF (default: `'cipher-kit-salt'`, must be ≥ 8 characters). */
135
145
  salt?: string;
146
+ /** Optional context info for HKDF (default: `'cipher-kit'`). */
136
147
  info?: string;
137
148
  }
138
149
  /**
@@ -368,6 +379,6 @@ declare const ENCRYPTED_REGEX: Readonly<{
368
379
  * matchPattern("abc.def.ghi.", "general"); // true
369
380
  * ```
370
381
  */
371
- declare function matchPattern(data: string, format: 'general' | 'node' | 'web'): boolean;
382
+ declare function matchPattern(data: string, format: "general" | "node" | "web"): boolean;
372
383
 
373
384
  export { type CipherEncoding as C, type DigestAlgorithm as D, ENCRYPTED_REGEX as E, type HashOptions as H, type Result as R, type SecretKey as S, type VerifyPasswordOptions as V, tryStringifyObj as a, type Encoding as b, type EncryptionAlgorithm as c, type CreateSecretKeyOptions as d, type EncryptOptions as e, type DecryptOptions as f, type HashPasswordOptions as g, matchPattern as m, parseToObj as p, stringifyObj as s, tryParseToObj as t };
package/dist/web-api.cjs CHANGED
@@ -1,129 +1,129 @@
1
1
  'use strict';
2
2
 
3
- var chunkXIWV7XVI_cjs = require('./chunk-XIWV7XVI.cjs');
4
- var chunkUIV6DG54_cjs = require('./chunk-UIV6DG54.cjs');
3
+ var chunkCVCDAHDW_cjs = require('./chunk-CVCDAHDW.cjs');
4
+ var chunk3UX5MZ2P_cjs = require('./chunk-3UX5MZ2P.cjs');
5
5
 
6
6
 
7
7
 
8
8
  Object.defineProperty(exports, "convertBytesToStr", {
9
9
  enumerable: true,
10
- get: function () { return chunkXIWV7XVI_cjs.convertBytesToStr; }
10
+ get: function () { return chunkCVCDAHDW_cjs.convertBytesToStr; }
11
11
  });
12
12
  Object.defineProperty(exports, "convertEncoding", {
13
13
  enumerable: true,
14
- get: function () { return chunkXIWV7XVI_cjs.convertEncoding; }
14
+ get: function () { return chunkCVCDAHDW_cjs.convertEncoding; }
15
15
  });
16
16
  Object.defineProperty(exports, "convertStrToBytes", {
17
17
  enumerable: true,
18
- get: function () { return chunkXIWV7XVI_cjs.convertStrToBytes; }
18
+ get: function () { return chunkCVCDAHDW_cjs.convertStrToBytes; }
19
19
  });
20
20
  Object.defineProperty(exports, "createSecretKey", {
21
21
  enumerable: true,
22
- get: function () { return chunkXIWV7XVI_cjs.createSecretKey; }
22
+ get: function () { return chunkCVCDAHDW_cjs.createSecretKey; }
23
23
  });
24
24
  Object.defineProperty(exports, "decrypt", {
25
25
  enumerable: true,
26
- get: function () { return chunkXIWV7XVI_cjs.decrypt; }
26
+ get: function () { return chunkCVCDAHDW_cjs.decrypt; }
27
27
  });
28
28
  Object.defineProperty(exports, "decryptObj", {
29
29
  enumerable: true,
30
- get: function () { return chunkXIWV7XVI_cjs.decryptObj; }
30
+ get: function () { return chunkCVCDAHDW_cjs.decryptObj; }
31
31
  });
32
32
  Object.defineProperty(exports, "encrypt", {
33
33
  enumerable: true,
34
- get: function () { return chunkXIWV7XVI_cjs.encrypt; }
34
+ get: function () { return chunkCVCDAHDW_cjs.encrypt; }
35
35
  });
36
36
  Object.defineProperty(exports, "encryptObj", {
37
37
  enumerable: true,
38
- get: function () { return chunkXIWV7XVI_cjs.encryptObj; }
38
+ get: function () { return chunkCVCDAHDW_cjs.encryptObj; }
39
39
  });
40
40
  Object.defineProperty(exports, "generateUuid", {
41
41
  enumerable: true,
42
- get: function () { return chunkXIWV7XVI_cjs.generateUuid; }
42
+ get: function () { return chunkCVCDAHDW_cjs.generateUuid; }
43
43
  });
44
44
  Object.defineProperty(exports, "hash", {
45
45
  enumerable: true,
46
- get: function () { return chunkXIWV7XVI_cjs.hash; }
46
+ get: function () { return chunkCVCDAHDW_cjs.hash; }
47
47
  });
48
48
  Object.defineProperty(exports, "hashPassword", {
49
49
  enumerable: true,
50
- get: function () { return chunkXIWV7XVI_cjs.hashPassword; }
50
+ get: function () { return chunkCVCDAHDW_cjs.hashPassword; }
51
51
  });
52
52
  Object.defineProperty(exports, "isWebSecretKey", {
53
53
  enumerable: true,
54
- get: function () { return chunkXIWV7XVI_cjs.isWebSecretKey; }
54
+ get: function () { return chunkCVCDAHDW_cjs.isWebSecretKey; }
55
55
  });
56
56
  Object.defineProperty(exports, "tryConvertBytesToStr", {
57
57
  enumerable: true,
58
- get: function () { return chunkXIWV7XVI_cjs.tryConvertBytesToStr; }
58
+ get: function () { return chunkCVCDAHDW_cjs.tryConvertBytesToStr; }
59
59
  });
60
60
  Object.defineProperty(exports, "tryConvertEncoding", {
61
61
  enumerable: true,
62
- get: function () { return chunkXIWV7XVI_cjs.tryConvertEncoding; }
62
+ get: function () { return chunkCVCDAHDW_cjs.tryConvertEncoding; }
63
63
  });
64
64
  Object.defineProperty(exports, "tryConvertStrToBytes", {
65
65
  enumerable: true,
66
- get: function () { return chunkXIWV7XVI_cjs.tryConvertStrToBytes; }
66
+ get: function () { return chunkCVCDAHDW_cjs.tryConvertStrToBytes; }
67
67
  });
68
68
  Object.defineProperty(exports, "tryCreateSecretKey", {
69
69
  enumerable: true,
70
- get: function () { return chunkXIWV7XVI_cjs.tryCreateSecretKey; }
70
+ get: function () { return chunkCVCDAHDW_cjs.tryCreateSecretKey; }
71
71
  });
72
72
  Object.defineProperty(exports, "tryDecrypt", {
73
73
  enumerable: true,
74
- get: function () { return chunkXIWV7XVI_cjs.tryDecrypt; }
74
+ get: function () { return chunkCVCDAHDW_cjs.tryDecrypt; }
75
75
  });
76
76
  Object.defineProperty(exports, "tryDecryptObj", {
77
77
  enumerable: true,
78
- get: function () { return chunkXIWV7XVI_cjs.tryDecryptObj; }
78
+ get: function () { return chunkCVCDAHDW_cjs.tryDecryptObj; }
79
79
  });
80
80
  Object.defineProperty(exports, "tryEncrypt", {
81
81
  enumerable: true,
82
- get: function () { return chunkXIWV7XVI_cjs.tryEncrypt; }
82
+ get: function () { return chunkCVCDAHDW_cjs.tryEncrypt; }
83
83
  });
84
84
  Object.defineProperty(exports, "tryEncryptObj", {
85
85
  enumerable: true,
86
- get: function () { return chunkXIWV7XVI_cjs.tryEncryptObj; }
86
+ get: function () { return chunkCVCDAHDW_cjs.tryEncryptObj; }
87
87
  });
88
88
  Object.defineProperty(exports, "tryGenerateUuid", {
89
89
  enumerable: true,
90
- get: function () { return chunkXIWV7XVI_cjs.tryGenerateUuid; }
90
+ get: function () { return chunkCVCDAHDW_cjs.tryGenerateUuid; }
91
91
  });
92
92
  Object.defineProperty(exports, "tryHash", {
93
93
  enumerable: true,
94
- get: function () { return chunkXIWV7XVI_cjs.tryHash; }
94
+ get: function () { return chunkCVCDAHDW_cjs.tryHash; }
95
95
  });
96
96
  Object.defineProperty(exports, "tryHashPassword", {
97
97
  enumerable: true,
98
- get: function () { return chunkXIWV7XVI_cjs.tryHashPassword; }
98
+ get: function () { return chunkCVCDAHDW_cjs.tryHashPassword; }
99
99
  });
100
100
  Object.defineProperty(exports, "verifyPassword", {
101
101
  enumerable: true,
102
- get: function () { return chunkXIWV7XVI_cjs.verifyPassword; }
102
+ get: function () { return chunkCVCDAHDW_cjs.verifyPassword; }
103
103
  });
104
104
  Object.defineProperty(exports, "ENCRYPTED_REGEX", {
105
105
  enumerable: true,
106
- get: function () { return chunkUIV6DG54_cjs.ENCRYPTED_REGEX; }
106
+ get: function () { return chunk3UX5MZ2P_cjs.ENCRYPTED_REGEX; }
107
107
  });
108
108
  Object.defineProperty(exports, "matchPattern", {
109
109
  enumerable: true,
110
- get: function () { return chunkUIV6DG54_cjs.matchPattern; }
110
+ get: function () { return chunk3UX5MZ2P_cjs.matchPattern; }
111
111
  });
112
112
  Object.defineProperty(exports, "parseToObj", {
113
113
  enumerable: true,
114
- get: function () { return chunkUIV6DG54_cjs.parseToObj; }
114
+ get: function () { return chunk3UX5MZ2P_cjs.parseToObj; }
115
115
  });
116
116
  Object.defineProperty(exports, "stringifyObj", {
117
117
  enumerable: true,
118
- get: function () { return chunkUIV6DG54_cjs.stringifyObj; }
118
+ get: function () { return chunk3UX5MZ2P_cjs.stringifyObj; }
119
119
  });
120
120
  Object.defineProperty(exports, "tryParseToObj", {
121
121
  enumerable: true,
122
- get: function () { return chunkUIV6DG54_cjs.tryParseToObj; }
122
+ get: function () { return chunk3UX5MZ2P_cjs.tryParseToObj; }
123
123
  });
124
124
  Object.defineProperty(exports, "tryStringifyObj", {
125
125
  enumerable: true,
126
- get: function () { return chunkUIV6DG54_cjs.tryStringifyObj; }
126
+ get: function () { return chunk3UX5MZ2P_cjs.tryStringifyObj; }
127
127
  });
128
128
  //# sourceMappingURL=web-api.cjs.map
129
129
  //# sourceMappingURL=web-api.cjs.map
@@ -1,3 +1,3 @@
1
- export { C as CipherEncoding, d as CreateSecretKeyOptions, f as DecryptOptions, D as DigestAlgorithm, E as ENCRYPTED_REGEX, b as Encoding, e as EncryptOptions, c as EncryptionAlgorithm, H as HashOptions, g as HashPasswordOptions, S as SecretKey, V as VerifyPasswordOptions, m as matchPattern, p as parseToObj, s as stringifyObj, t as tryParseToObj, a as tryStringifyObj } from './validate-Cb7IOrPo.cjs';
2
- export { u as convertBytesToStr, y as convertEncoding, r as convertStrToBytes, c as createSecretKey, f as decrypt, l as decryptObj, e as encrypt, j as encryptObj, g as generateUuid, n as hash, p as hashPassword, i as isWebSecretKey, s as tryConvertBytesToStr, x as tryConvertEncoding, q as tryConvertStrToBytes, a as tryCreateSecretKey, d as tryDecrypt, k as tryDecryptObj, b as tryEncrypt, h as tryEncryptObj, t as tryGenerateUuid, m as tryHash, o as tryHashPassword, v as verifyPassword } from './export-Gd8hafl6.cjs';
1
+ export { C as CipherEncoding, d as CreateSecretKeyOptions, f as DecryptOptions, D as DigestAlgorithm, E as ENCRYPTED_REGEX, b as Encoding, e as EncryptOptions, c as EncryptionAlgorithm, H as HashOptions, g as HashPasswordOptions, S as SecretKey, V as VerifyPasswordOptions, m as matchPattern, p as parseToObj, s as stringifyObj, t as tryParseToObj, a as tryStringifyObj } from './validate-EHuJC5QQ.cjs';
2
+ export { u as convertBytesToStr, y as convertEncoding, r as convertStrToBytes, c as createSecretKey, f as decrypt, l as decryptObj, e as encrypt, j as encryptObj, g as generateUuid, n as hash, p as hashPassword, i as isWebSecretKey, s as tryConvertBytesToStr, x as tryConvertEncoding, q as tryConvertStrToBytes, a as tryCreateSecretKey, d as tryDecrypt, k as tryDecryptObj, b as tryEncrypt, h as tryEncryptObj, t as tryGenerateUuid, m as tryHash, o as tryHashPassword, v as verifyPassword } from './export-55tHE0Bw.cjs';
3
3
  import 'node:crypto';
package/dist/web-api.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export { C as CipherEncoding, d as CreateSecretKeyOptions, f as DecryptOptions, D as DigestAlgorithm, E as ENCRYPTED_REGEX, b as Encoding, e as EncryptOptions, c as EncryptionAlgorithm, H as HashOptions, g as HashPasswordOptions, S as SecretKey, V as VerifyPasswordOptions, m as matchPattern, p as parseToObj, s as stringifyObj, t as tryParseToObj, a as tryStringifyObj } from './validate-Cb7IOrPo.js';
2
- export { u as convertBytesToStr, y as convertEncoding, r as convertStrToBytes, c as createSecretKey, f as decrypt, l as decryptObj, e as encrypt, j as encryptObj, g as generateUuid, n as hash, p as hashPassword, i as isWebSecretKey, s as tryConvertBytesToStr, x as tryConvertEncoding, q as tryConvertStrToBytes, a as tryCreateSecretKey, d as tryDecrypt, k as tryDecryptObj, b as tryEncrypt, h as tryEncryptObj, t as tryGenerateUuid, m as tryHash, o as tryHashPassword, v as verifyPassword } from './export-DGrELdz_.js';
1
+ export { C as CipherEncoding, d as CreateSecretKeyOptions, f as DecryptOptions, D as DigestAlgorithm, E as ENCRYPTED_REGEX, b as Encoding, e as EncryptOptions, c as EncryptionAlgorithm, H as HashOptions, g as HashPasswordOptions, S as SecretKey, V as VerifyPasswordOptions, m as matchPattern, p as parseToObj, s as stringifyObj, t as tryParseToObj, a as tryStringifyObj } from './validate-EHuJC5QQ.js';
2
+ export { u as convertBytesToStr, y as convertEncoding, r as convertStrToBytes, c as createSecretKey, f as decrypt, l as decryptObj, e as encrypt, j as encryptObj, g as generateUuid, n as hash, p as hashPassword, i as isWebSecretKey, s as tryConvertBytesToStr, x as tryConvertEncoding, q as tryConvertStrToBytes, a as tryCreateSecretKey, d as tryDecrypt, k as tryDecryptObj, b as tryEncrypt, h as tryEncryptObj, t as tryGenerateUuid, m as tryHash, o as tryHashPassword, v as verifyPassword } from './export-llM6c7Do.js';
3
3
  import 'node:crypto';
package/dist/web-api.js CHANGED
@@ -1,4 +1,4 @@
1
- export { convertBytesToStr, convertEncoding, convertStrToBytes, createSecretKey, decrypt, decryptObj, encrypt, encryptObj, generateUuid, hash, hashPassword, isWebSecretKey, tryConvertBytesToStr, tryConvertEncoding, tryConvertStrToBytes, tryCreateSecretKey, tryDecrypt, tryDecryptObj, tryEncrypt, tryEncryptObj, tryGenerateUuid, tryHash, tryHashPassword, verifyPassword } from './chunk-LHB5NXYW.js';
2
- export { ENCRYPTED_REGEX, matchPattern, parseToObj, stringifyObj, tryParseToObj, tryStringifyObj } from './chunk-YMNOTRET.js';
1
+ export { convertBytesToStr, convertEncoding, convertStrToBytes, createSecretKey, decrypt, decryptObj, encrypt, encryptObj, generateUuid, hash, hashPassword, isWebSecretKey, tryConvertBytesToStr, tryConvertEncoding, tryConvertStrToBytes, tryCreateSecretKey, tryDecrypt, tryDecryptObj, tryEncrypt, tryEncryptObj, tryGenerateUuid, tryHash, tryHashPassword, verifyPassword } from './chunk-4MFF6V3R.js';
2
+ export { ENCRYPTED_REGEX, matchPattern, parseToObj, stringifyObj, tryParseToObj, tryStringifyObj } from './chunk-FKSYSPJR.js';
3
3
  //# sourceMappingURL=web-api.js.map
4
4
  //# sourceMappingURL=web-api.js.map
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "cipher-kit",
3
- "version": "2.0.0-beta.4",
4
- "description": "🔐 Secure, Lightweight, and Cross-Platform Encryption, Decryption, and Hashing for Web, Node.js, Deno, Bun, and Cloudflare Workers",
3
+ "version": "2.0.0",
4
+ "description": "🔐 Secure, Modern, and Cross-Platform Cryptography Helpers for Web, Node.js, Deno, Bun, and Cloudflare Workers",
5
5
  "homepage": "https://github.com/WolfieLeader/npm/tree/main/packages/cipher-kit#readme",
6
6
  "repository": {
7
7
  "type": "git",
@@ -87,6 +87,7 @@
87
87
  "deno",
88
88
  "bun",
89
89
  "cloudflare",
90
- "workers"
90
+ "workers",
91
+ "password"
91
92
  ]
92
93
  }