@twin.org/crypto 0.0.3-next.2 → 0.0.3-next.22
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/es/helpers/integrityHelper.js +67 -0
- package/dist/es/helpers/integrityHelper.js.map +1 -0
- package/dist/es/index.js +2 -0
- package/dist/es/index.js.map +1 -1
- package/dist/es/models/integrityAlgorithm.js +21 -0
- package/dist/es/models/integrityAlgorithm.js.map +1 -0
- package/dist/es/passwords/passwordGenerator.js +70 -12
- package/dist/es/passwords/passwordGenerator.js.map +1 -1
- package/dist/es/passwords/passwordValidator.js +68 -4
- package/dist/es/passwords/passwordValidator.js.map +1 -1
- package/dist/types/helpers/integrityHelper.d.ts +26 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/models/integrityAlgorithm.d.ts +21 -0
- package/dist/types/passwords/passwordGenerator.d.ts +13 -2
- package/dist/types/passwords/passwordValidator.d.ts +34 -2
- package/docs/changelog.md +418 -0
- package/docs/reference/classes/IntegrityHelper.md +85 -0
- package/docs/reference/classes/PasswordGenerator.md +38 -2
- package/docs/reference/classes/PasswordValidator.md +115 -2
- package/docs/reference/index.md +3 -0
- package/docs/reference/type-aliases/IntegrityAlgorithm.md +5 -0
- package/docs/reference/variables/IntegrityAlgorithm.md +25 -0
- package/package.json +3 -3
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,423 @@
|
|
|
1
1
|
# @twin.org/crypto - Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.3-next.22](https://github.com/twinfoundation/framework/compare/crypto-v0.0.3-next.21...crypto-v0.0.3-next.22) (2026-02-26)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Miscellaneous Chores
|
|
7
|
+
|
|
8
|
+
* **crypto:** Synchronize repo versions
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Dependencies
|
|
12
|
+
|
|
13
|
+
* The following workspace dependencies were updated
|
|
14
|
+
* dependencies
|
|
15
|
+
* @twin.org/core bumped from 0.0.3-next.21 to 0.0.3-next.22
|
|
16
|
+
* @twin.org/nameof bumped from 0.0.3-next.21 to 0.0.3-next.22
|
|
17
|
+
* devDependencies
|
|
18
|
+
* @twin.org/nameof-transformer bumped from 0.0.3-next.21 to 0.0.3-next.22
|
|
19
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.21 to 0.0.3-next.22
|
|
20
|
+
* @twin.org/validate-locales bumped from 0.0.3-next.21 to 0.0.3-next.22
|
|
21
|
+
|
|
22
|
+
## [0.0.3-next.21](https://github.com/twinfoundation/framework/compare/crypto-v0.0.3-next.20...crypto-v0.0.3-next.21) (2026-02-26)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Features
|
|
26
|
+
|
|
27
|
+
* add context id features ([#206](https://github.com/twinfoundation/framework/issues/206)) ([ef0d4ee](https://github.com/twinfoundation/framework/commit/ef0d4ee11a4f5fc6cc6f52a4958ce905c04ee13b))
|
|
28
|
+
* add guards arrayEndsWith and arrayStartsWith ([95d875e](https://github.com/twinfoundation/framework/commit/95d875ec8ccb4713c145fdde941d4cfedcec2ed3))
|
|
29
|
+
* add mnemonic validation ([4b43491](https://github.com/twinfoundation/framework/commit/4b43491cf04bb626c27faea66e5c74b3971b111d))
|
|
30
|
+
* add rsa cipher support ([7af6cc6](https://github.com/twinfoundation/framework/commit/7af6cc67512d3363bd4a2f2e87bd7733c2800147))
|
|
31
|
+
* add RSA support for public key components ([7126259](https://github.com/twinfoundation/framework/commit/7126259103b758c291e52a8a03818eb822d1aad1))
|
|
32
|
+
* additional RSA methods and async ([1fceee2](https://github.com/twinfoundation/framework/commit/1fceee2d1248a24a7620846025fcf906495c07f4))
|
|
33
|
+
* change method accessibility ([c1b77fc](https://github.com/twinfoundation/framework/commit/c1b77fcfb61c092a01c97aebb2fe2dc2bbaa221b))
|
|
34
|
+
* eslint migration to flat config ([74427d7](https://github.com/twinfoundation/framework/commit/74427d78d342167f7850e49ab87269326355befe))
|
|
35
|
+
* factory create and integrity ([#235](https://github.com/twinfoundation/framework/issues/235)) ([9f98b99](https://github.com/twinfoundation/framework/commit/9f98b99daf46eb365346fae49cc4ffba63e74cb3))
|
|
36
|
+
* improved password generation and validation ([#232](https://github.com/twinfoundation/framework/issues/232)) ([ca4e18f](https://github.com/twinfoundation/framework/commit/ca4e18f388b1882cdfb774fc0d0921b8530fac33))
|
|
37
|
+
* locales validation ([#197](https://github.com/twinfoundation/framework/issues/197)) ([55fdadb](https://github.com/twinfoundation/framework/commit/55fdadb13595ce0047f787bd1d4135d429a99f12))
|
|
38
|
+
* relocate core packages from tools ([bcab8f3](https://github.com/twinfoundation/framework/commit/bcab8f3160442ea4fcaf442947462504f3d6a17d))
|
|
39
|
+
* update dependencies ([f3bd015](https://github.com/twinfoundation/framework/commit/f3bd015efd169196b7e0335f5cab876ba6ca1d75))
|
|
40
|
+
* use cause instead of inner for errors ([1f4acc4](https://github.com/twinfoundation/framework/commit/1f4acc4d7a6b71a134d9547da9bf40de1e1e49da))
|
|
41
|
+
* use new shared store mechanism ([#131](https://github.com/twinfoundation/framework/issues/131)) ([934385b](https://github.com/twinfoundation/framework/commit/934385b2fbaf9f5c00a505ebf9d093bd5a425f55))
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
### Bug Fixes
|
|
45
|
+
|
|
46
|
+
* docs ([9df46e0](https://github.com/twinfoundation/framework/commit/9df46e0a3940a4d1f479373f58830519262f9590))
|
|
47
|
+
* docs ([67c8887](https://github.com/twinfoundation/framework/commit/67c888739448e753106ea067a8703d058e0ddf12))
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
### Dependencies
|
|
51
|
+
|
|
52
|
+
* The following workspace dependencies were updated
|
|
53
|
+
* dependencies
|
|
54
|
+
* @twin.org/core bumped from 0.0.3-next.20 to 0.0.3-next.21
|
|
55
|
+
* @twin.org/nameof bumped from 0.0.3-next.20 to 0.0.3-next.21
|
|
56
|
+
* devDependencies
|
|
57
|
+
* @twin.org/nameof-transformer bumped from 0.0.3-next.20 to 0.0.3-next.21
|
|
58
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.20 to 0.0.3-next.21
|
|
59
|
+
* @twin.org/validate-locales bumped from 0.0.3-next.20 to 0.0.3-next.21
|
|
60
|
+
|
|
61
|
+
## [0.0.3-next.20](https://github.com/twinfoundation/framework/compare/crypto-v0.0.3-next.19...crypto-v0.0.3-next.20) (2026-02-26)
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
### Miscellaneous Chores
|
|
65
|
+
|
|
66
|
+
* **crypto:** Synchronize repo versions
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
### Dependencies
|
|
70
|
+
|
|
71
|
+
* The following workspace dependencies were updated
|
|
72
|
+
* dependencies
|
|
73
|
+
* @twin.org/core bumped from 0.0.3-next.19 to 0.0.3-next.20
|
|
74
|
+
* @twin.org/nameof bumped from 0.0.3-next.19 to 0.0.3-next.20
|
|
75
|
+
* devDependencies
|
|
76
|
+
* @twin.org/nameof-transformer bumped from 0.0.3-next.19 to 0.0.3-next.20
|
|
77
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.19 to 0.0.3-next.20
|
|
78
|
+
* @twin.org/validate-locales bumped from 0.0.3-next.19 to 0.0.3-next.20
|
|
79
|
+
|
|
80
|
+
## [0.0.3-next.19](https://github.com/twinfoundation/framework/compare/crypto-v0.0.3-next.18...crypto-v0.0.3-next.19) (2026-02-26)
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
### Miscellaneous Chores
|
|
84
|
+
|
|
85
|
+
* **crypto:** Synchronize repo versions
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
### Dependencies
|
|
89
|
+
|
|
90
|
+
* The following workspace dependencies were updated
|
|
91
|
+
* dependencies
|
|
92
|
+
* @twin.org/core bumped from 0.0.3-next.18 to 0.0.3-next.19
|
|
93
|
+
* @twin.org/nameof bumped from 0.0.3-next.18 to 0.0.3-next.19
|
|
94
|
+
* devDependencies
|
|
95
|
+
* @twin.org/nameof-transformer bumped from 0.0.3-next.18 to 0.0.3-next.19
|
|
96
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.18 to 0.0.3-next.19
|
|
97
|
+
* @twin.org/validate-locales bumped from 0.0.3-next.18 to 0.0.3-next.19
|
|
98
|
+
|
|
99
|
+
## [0.0.3-next.18](https://github.com/twinfoundation/framework/compare/crypto-v0.0.3-next.17...crypto-v0.0.3-next.18) (2026-02-23)
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
### Miscellaneous Chores
|
|
103
|
+
|
|
104
|
+
* **crypto:** Synchronize repo versions
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
### Dependencies
|
|
108
|
+
|
|
109
|
+
* The following workspace dependencies were updated
|
|
110
|
+
* dependencies
|
|
111
|
+
* @twin.org/core bumped from 0.0.3-next.17 to 0.0.3-next.18
|
|
112
|
+
* @twin.org/nameof bumped from 0.0.3-next.17 to 0.0.3-next.18
|
|
113
|
+
* devDependencies
|
|
114
|
+
* @twin.org/nameof-transformer bumped from 0.0.3-next.17 to 0.0.3-next.18
|
|
115
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.17 to 0.0.3-next.18
|
|
116
|
+
* @twin.org/validate-locales bumped from 0.0.3-next.17 to 0.0.3-next.18
|
|
117
|
+
|
|
118
|
+
## [0.0.3-next.17](https://github.com/twinfoundation/framework/compare/crypto-v0.0.3-next.16...crypto-v0.0.3-next.17) (2026-02-09)
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
### Features
|
|
122
|
+
|
|
123
|
+
* factory create and integrity ([#235](https://github.com/twinfoundation/framework/issues/235)) ([9f98b99](https://github.com/twinfoundation/framework/commit/9f98b99daf46eb365346fae49cc4ffba63e74cb3))
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
### Bug Fixes
|
|
127
|
+
|
|
128
|
+
* docs ([9df46e0](https://github.com/twinfoundation/framework/commit/9df46e0a3940a4d1f479373f58830519262f9590))
|
|
129
|
+
* docs ([67c8887](https://github.com/twinfoundation/framework/commit/67c888739448e753106ea067a8703d058e0ddf12))
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
### Dependencies
|
|
133
|
+
|
|
134
|
+
* The following workspace dependencies were updated
|
|
135
|
+
* dependencies
|
|
136
|
+
* @twin.org/core bumped from 0.0.3-next.16 to 0.0.3-next.17
|
|
137
|
+
* @twin.org/nameof bumped from 0.0.3-next.16 to 0.0.3-next.17
|
|
138
|
+
* devDependencies
|
|
139
|
+
* @twin.org/nameof-transformer bumped from 0.0.3-next.16 to 0.0.3-next.17
|
|
140
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.16 to 0.0.3-next.17
|
|
141
|
+
* @twin.org/validate-locales bumped from 0.0.3-next.16 to 0.0.3-next.17
|
|
142
|
+
|
|
143
|
+
## [0.0.3-next.16](https://github.com/twinfoundation/framework/compare/crypto-v0.0.3-next.15...crypto-v0.0.3-next.16) (2026-02-06)
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
### Features
|
|
147
|
+
|
|
148
|
+
* improved password generation and validation ([#232](https://github.com/twinfoundation/framework/issues/232)) ([ca4e18f](https://github.com/twinfoundation/framework/commit/ca4e18f388b1882cdfb774fc0d0921b8530fac33))
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
### Dependencies
|
|
152
|
+
|
|
153
|
+
* The following workspace dependencies were updated
|
|
154
|
+
* dependencies
|
|
155
|
+
* @twin.org/core bumped from 0.0.3-next.15 to 0.0.3-next.16
|
|
156
|
+
* @twin.org/nameof bumped from 0.0.3-next.15 to 0.0.3-next.16
|
|
157
|
+
* devDependencies
|
|
158
|
+
* @twin.org/nameof-transformer bumped from 0.0.3-next.15 to 0.0.3-next.16
|
|
159
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.15 to 0.0.3-next.16
|
|
160
|
+
* @twin.org/validate-locales bumped from 0.0.3-next.15 to 0.0.3-next.16
|
|
161
|
+
|
|
162
|
+
## [0.0.3-next.15](https://github.com/twinfoundation/framework/compare/crypto-v0.0.3-next.14...crypto-v0.0.3-next.15) (2026-01-29)
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
### Miscellaneous Chores
|
|
166
|
+
|
|
167
|
+
* **crypto:** Synchronize repo versions
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
### Dependencies
|
|
171
|
+
|
|
172
|
+
* The following workspace dependencies were updated
|
|
173
|
+
* dependencies
|
|
174
|
+
* @twin.org/core bumped from 0.0.3-next.14 to 0.0.3-next.15
|
|
175
|
+
* @twin.org/nameof bumped from 0.0.3-next.14 to 0.0.3-next.15
|
|
176
|
+
* devDependencies
|
|
177
|
+
* @twin.org/nameof-transformer bumped from 0.0.3-next.14 to 0.0.3-next.15
|
|
178
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.14 to 0.0.3-next.15
|
|
179
|
+
* @twin.org/validate-locales bumped from 0.0.3-next.14 to 0.0.3-next.15
|
|
180
|
+
|
|
181
|
+
## [0.0.3-next.14](https://github.com/twinfoundation/framework/compare/crypto-v0.0.3-next.13...crypto-v0.0.3-next.14) (2026-01-22)
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
### Miscellaneous Chores
|
|
185
|
+
|
|
186
|
+
* **crypto:** Synchronize repo versions
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
### Dependencies
|
|
190
|
+
|
|
191
|
+
* The following workspace dependencies were updated
|
|
192
|
+
* dependencies
|
|
193
|
+
* @twin.org/core bumped from 0.0.3-next.13 to 0.0.3-next.14
|
|
194
|
+
* @twin.org/nameof bumped from 0.0.3-next.13 to 0.0.3-next.14
|
|
195
|
+
* devDependencies
|
|
196
|
+
* @twin.org/nameof-transformer bumped from 0.0.3-next.13 to 0.0.3-next.14
|
|
197
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.13 to 0.0.3-next.14
|
|
198
|
+
* @twin.org/validate-locales bumped from 0.0.3-next.13 to 0.0.3-next.14
|
|
199
|
+
|
|
200
|
+
## [0.0.3-next.13](https://github.com/twinfoundation/framework/compare/crypto-v0.0.3-next.12...crypto-v0.0.3-next.13) (2026-01-08)
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
### Miscellaneous Chores
|
|
204
|
+
|
|
205
|
+
* **crypto:** Synchronize repo versions
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
### Dependencies
|
|
209
|
+
|
|
210
|
+
* The following workspace dependencies were updated
|
|
211
|
+
* dependencies
|
|
212
|
+
* @twin.org/core bumped from 0.0.3-next.12 to 0.0.3-next.13
|
|
213
|
+
* @twin.org/nameof bumped from 0.0.3-next.12 to 0.0.3-next.13
|
|
214
|
+
* devDependencies
|
|
215
|
+
* @twin.org/nameof-transformer bumped from 0.0.3-next.12 to 0.0.3-next.13
|
|
216
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.12 to 0.0.3-next.13
|
|
217
|
+
* @twin.org/validate-locales bumped from 0.0.3-next.12 to 0.0.3-next.13
|
|
218
|
+
|
|
219
|
+
## [0.0.3-next.12](https://github.com/twinfoundation/framework/compare/crypto-v0.0.3-next.11...crypto-v0.0.3-next.12) (2026-01-08)
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
### Miscellaneous Chores
|
|
223
|
+
|
|
224
|
+
* **crypto:** Synchronize repo versions
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
### Dependencies
|
|
228
|
+
|
|
229
|
+
* The following workspace dependencies were updated
|
|
230
|
+
* dependencies
|
|
231
|
+
* @twin.org/core bumped from 0.0.3-next.11 to 0.0.3-next.12
|
|
232
|
+
* @twin.org/nameof bumped from 0.0.3-next.11 to 0.0.3-next.12
|
|
233
|
+
* devDependencies
|
|
234
|
+
* @twin.org/nameof-transformer bumped from 0.0.3-next.11 to 0.0.3-next.12
|
|
235
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.11 to 0.0.3-next.12
|
|
236
|
+
* @twin.org/validate-locales bumped from 0.0.3-next.11 to 0.0.3-next.12
|
|
237
|
+
|
|
238
|
+
## [0.0.3-next.11](https://github.com/twinfoundation/framework/compare/crypto-v0.0.3-next.10...crypto-v0.0.3-next.11) (2026-01-07)
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
### Miscellaneous Chores
|
|
242
|
+
|
|
243
|
+
* **crypto:** Synchronize repo versions
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
### Dependencies
|
|
247
|
+
|
|
248
|
+
* The following workspace dependencies were updated
|
|
249
|
+
* dependencies
|
|
250
|
+
* @twin.org/core bumped from 0.0.3-next.10 to 0.0.3-next.11
|
|
251
|
+
* @twin.org/nameof bumped from 0.0.3-next.10 to 0.0.3-next.11
|
|
252
|
+
* devDependencies
|
|
253
|
+
* @twin.org/nameof-transformer bumped from 0.0.3-next.10 to 0.0.3-next.11
|
|
254
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.10 to 0.0.3-next.11
|
|
255
|
+
* @twin.org/validate-locales bumped from 0.0.3-next.10 to 0.0.3-next.11
|
|
256
|
+
|
|
257
|
+
## [0.0.3-next.10](https://github.com/twinfoundation/framework/compare/crypto-v0.0.3-next.9...crypto-v0.0.3-next.10) (2026-01-07)
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
### Miscellaneous Chores
|
|
261
|
+
|
|
262
|
+
* **crypto:** Synchronize repo versions
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
### Dependencies
|
|
266
|
+
|
|
267
|
+
* The following workspace dependencies were updated
|
|
268
|
+
* dependencies
|
|
269
|
+
* @twin.org/core bumped from 0.0.3-next.9 to 0.0.3-next.10
|
|
270
|
+
* @twin.org/nameof bumped from 0.0.3-next.9 to 0.0.3-next.10
|
|
271
|
+
* devDependencies
|
|
272
|
+
* @twin.org/nameof-transformer bumped from 0.0.3-next.9 to 0.0.3-next.10
|
|
273
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.9 to 0.0.3-next.10
|
|
274
|
+
* @twin.org/validate-locales bumped from 0.0.3-next.9 to 0.0.3-next.10
|
|
275
|
+
|
|
276
|
+
## [0.0.3-next.9](https://github.com/twinfoundation/framework/compare/crypto-v0.0.3-next.8...crypto-v0.0.3-next.9) (2026-01-05)
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
### Miscellaneous Chores
|
|
280
|
+
|
|
281
|
+
* **crypto:** Synchronize repo versions
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
### Dependencies
|
|
285
|
+
|
|
286
|
+
* The following workspace dependencies were updated
|
|
287
|
+
* dependencies
|
|
288
|
+
* @twin.org/core bumped from 0.0.3-next.8 to 0.0.3-next.9
|
|
289
|
+
* @twin.org/nameof bumped from 0.0.3-next.8 to 0.0.3-next.9
|
|
290
|
+
* devDependencies
|
|
291
|
+
* @twin.org/nameof-transformer bumped from 0.0.3-next.8 to 0.0.3-next.9
|
|
292
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.8 to 0.0.3-next.9
|
|
293
|
+
* @twin.org/validate-locales bumped from 0.0.3-next.8 to 0.0.3-next.9
|
|
294
|
+
|
|
295
|
+
## [0.0.3-next.8](https://github.com/twinfoundation/framework/compare/crypto-v0.0.3-next.7...crypto-v0.0.3-next.8) (2025-11-26)
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
### Miscellaneous Chores
|
|
299
|
+
|
|
300
|
+
* **crypto:** Synchronize repo versions
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
### Dependencies
|
|
304
|
+
|
|
305
|
+
* The following workspace dependencies were updated
|
|
306
|
+
* dependencies
|
|
307
|
+
* @twin.org/core bumped from 0.0.3-next.7 to 0.0.3-next.8
|
|
308
|
+
* @twin.org/nameof bumped from 0.0.3-next.7 to 0.0.3-next.8
|
|
309
|
+
* devDependencies
|
|
310
|
+
* @twin.org/nameof-transformer bumped from 0.0.3-next.7 to 0.0.3-next.8
|
|
311
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.7 to 0.0.3-next.8
|
|
312
|
+
* @twin.org/validate-locales bumped from 0.0.3-next.7 to 0.0.3-next.8
|
|
313
|
+
|
|
314
|
+
## [0.0.3-next.7](https://github.com/twinfoundation/framework/compare/crypto-v0.0.3-next.6...crypto-v0.0.3-next.7) (2025-11-25)
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
### Features
|
|
318
|
+
|
|
319
|
+
* add context id features ([#206](https://github.com/twinfoundation/framework/issues/206)) ([ef0d4ee](https://github.com/twinfoundation/framework/commit/ef0d4ee11a4f5fc6cc6f52a4958ce905c04ee13b))
|
|
320
|
+
* add guards arrayEndsWith and arrayStartsWith ([95d875e](https://github.com/twinfoundation/framework/commit/95d875ec8ccb4713c145fdde941d4cfedcec2ed3))
|
|
321
|
+
* add mnemonic validation ([4b43491](https://github.com/twinfoundation/framework/commit/4b43491cf04bb626c27faea66e5c74b3971b111d))
|
|
322
|
+
* add rsa cipher support ([7af6cc6](https://github.com/twinfoundation/framework/commit/7af6cc67512d3363bd4a2f2e87bd7733c2800147))
|
|
323
|
+
* add RSA support for public key components ([7126259](https://github.com/twinfoundation/framework/commit/7126259103b758c291e52a8a03818eb822d1aad1))
|
|
324
|
+
* additional RSA methods and async ([1fceee2](https://github.com/twinfoundation/framework/commit/1fceee2d1248a24a7620846025fcf906495c07f4))
|
|
325
|
+
* change method accessibility ([c1b77fc](https://github.com/twinfoundation/framework/commit/c1b77fcfb61c092a01c97aebb2fe2dc2bbaa221b))
|
|
326
|
+
* eslint migration to flat config ([74427d7](https://github.com/twinfoundation/framework/commit/74427d78d342167f7850e49ab87269326355befe))
|
|
327
|
+
* locales validation ([#197](https://github.com/twinfoundation/framework/issues/197)) ([55fdadb](https://github.com/twinfoundation/framework/commit/55fdadb13595ce0047f787bd1d4135d429a99f12))
|
|
328
|
+
* relocate core packages from tools ([bcab8f3](https://github.com/twinfoundation/framework/commit/bcab8f3160442ea4fcaf442947462504f3d6a17d))
|
|
329
|
+
* update dependencies ([f3bd015](https://github.com/twinfoundation/framework/commit/f3bd015efd169196b7e0335f5cab876ba6ca1d75))
|
|
330
|
+
* use cause instead of inner for errors ([1f4acc4](https://github.com/twinfoundation/framework/commit/1f4acc4d7a6b71a134d9547da9bf40de1e1e49da))
|
|
331
|
+
* use new shared store mechanism ([#131](https://github.com/twinfoundation/framework/issues/131)) ([934385b](https://github.com/twinfoundation/framework/commit/934385b2fbaf9f5c00a505ebf9d093bd5a425f55))
|
|
332
|
+
|
|
333
|
+
|
|
334
|
+
### Dependencies
|
|
335
|
+
|
|
336
|
+
* The following workspace dependencies were updated
|
|
337
|
+
* dependencies
|
|
338
|
+
* @twin.org/core bumped from 0.0.3-next.6 to 0.0.3-next.7
|
|
339
|
+
* @twin.org/nameof bumped from 0.0.3-next.6 to 0.0.3-next.7
|
|
340
|
+
* devDependencies
|
|
341
|
+
* @twin.org/nameof-transformer bumped from 0.0.3-next.6 to 0.0.3-next.7
|
|
342
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.6 to 0.0.3-next.7
|
|
343
|
+
* @twin.org/validate-locales bumped from 0.0.3-next.6 to 0.0.3-next.7
|
|
344
|
+
|
|
345
|
+
## [0.0.3-next.6](https://github.com/twinfoundation/framework/compare/crypto-v0.0.3-next.5...crypto-v0.0.3-next.6) (2025-11-25)
|
|
346
|
+
|
|
347
|
+
|
|
348
|
+
### Miscellaneous Chores
|
|
349
|
+
|
|
350
|
+
* **crypto:** Synchronize repo versions
|
|
351
|
+
|
|
352
|
+
|
|
353
|
+
### Dependencies
|
|
354
|
+
|
|
355
|
+
* The following workspace dependencies were updated
|
|
356
|
+
* dependencies
|
|
357
|
+
* @twin.org/core bumped from 0.0.3-next.5 to 0.0.3-next.6
|
|
358
|
+
* @twin.org/nameof bumped from 0.0.3-next.5 to 0.0.3-next.6
|
|
359
|
+
* devDependencies
|
|
360
|
+
* @twin.org/nameof-transformer bumped from 0.0.3-next.5 to 0.0.3-next.6
|
|
361
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.5 to 0.0.3-next.6
|
|
362
|
+
* @twin.org/validate-locales bumped from 0.0.3-next.5 to 0.0.3-next.6
|
|
363
|
+
|
|
364
|
+
## [0.0.3-next.5](https://github.com/twinfoundation/framework/compare/crypto-v0.0.3-next.4...crypto-v0.0.3-next.5) (2025-11-20)
|
|
365
|
+
|
|
366
|
+
|
|
367
|
+
### Miscellaneous Chores
|
|
368
|
+
|
|
369
|
+
* **crypto:** Synchronize repo versions
|
|
370
|
+
|
|
371
|
+
|
|
372
|
+
### Dependencies
|
|
373
|
+
|
|
374
|
+
* The following workspace dependencies were updated
|
|
375
|
+
* dependencies
|
|
376
|
+
* @twin.org/core bumped from 0.0.3-next.4 to 0.0.3-next.5
|
|
377
|
+
* @twin.org/nameof bumped from 0.0.3-next.4 to 0.0.3-next.5
|
|
378
|
+
* devDependencies
|
|
379
|
+
* @twin.org/nameof-transformer bumped from 0.0.3-next.4 to 0.0.3-next.5
|
|
380
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.4 to 0.0.3-next.5
|
|
381
|
+
* @twin.org/validate-locales bumped from 0.0.3-next.4 to 0.0.3-next.5
|
|
382
|
+
|
|
383
|
+
## [0.0.3-next.4](https://github.com/twinfoundation/framework/compare/crypto-v0.0.3-next.3...crypto-v0.0.3-next.4) (2025-11-13)
|
|
384
|
+
|
|
385
|
+
|
|
386
|
+
### Miscellaneous Chores
|
|
387
|
+
|
|
388
|
+
* **crypto:** Synchronize repo versions
|
|
389
|
+
|
|
390
|
+
|
|
391
|
+
### Dependencies
|
|
392
|
+
|
|
393
|
+
* The following workspace dependencies were updated
|
|
394
|
+
* dependencies
|
|
395
|
+
* @twin.org/core bumped from 0.0.3-next.3 to 0.0.3-next.4
|
|
396
|
+
* @twin.org/nameof bumped from 0.0.3-next.3 to 0.0.3-next.4
|
|
397
|
+
* devDependencies
|
|
398
|
+
* @twin.org/nameof-transformer bumped from 0.0.3-next.3 to 0.0.3-next.4
|
|
399
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.3 to 0.0.3-next.4
|
|
400
|
+
* @twin.org/validate-locales bumped from 0.0.3-next.3 to 0.0.3-next.4
|
|
401
|
+
|
|
402
|
+
## [0.0.3-next.3](https://github.com/twinfoundation/framework/compare/crypto-v0.0.3-next.2...crypto-v0.0.3-next.3) (2025-11-12)
|
|
403
|
+
|
|
404
|
+
|
|
405
|
+
### Miscellaneous Chores
|
|
406
|
+
|
|
407
|
+
* **crypto:** Synchronize repo versions
|
|
408
|
+
|
|
409
|
+
|
|
410
|
+
### Dependencies
|
|
411
|
+
|
|
412
|
+
* The following workspace dependencies were updated
|
|
413
|
+
* dependencies
|
|
414
|
+
* @twin.org/core bumped from 0.0.3-next.2 to 0.0.3-next.3
|
|
415
|
+
* @twin.org/nameof bumped from 0.0.3-next.2 to 0.0.3-next.3
|
|
416
|
+
* devDependencies
|
|
417
|
+
* @twin.org/nameof-transformer bumped from 0.0.3-next.2 to 0.0.3-next.3
|
|
418
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.2 to 0.0.3-next.3
|
|
419
|
+
* @twin.org/validate-locales bumped from 0.0.3-next.2 to 0.0.3-next.3
|
|
420
|
+
|
|
3
421
|
## [0.0.3-next.2](https://github.com/twinfoundation/framework/compare/crypto-v0.0.3-next.1...crypto-v0.0.3-next.2) (2025-11-12)
|
|
4
422
|
|
|
5
423
|
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# Class: IntegrityHelper
|
|
2
|
+
|
|
3
|
+
Helper class for creating integrity signatures.
|
|
4
|
+
|
|
5
|
+
## See
|
|
6
|
+
|
|
7
|
+
https://www.w3.org/TR/SRI/
|
|
8
|
+
|
|
9
|
+
## Constructors
|
|
10
|
+
|
|
11
|
+
### Constructor
|
|
12
|
+
|
|
13
|
+
> **new IntegrityHelper**(): `IntegrityHelper`
|
|
14
|
+
|
|
15
|
+
#### Returns
|
|
16
|
+
|
|
17
|
+
`IntegrityHelper`
|
|
18
|
+
|
|
19
|
+
## Properties
|
|
20
|
+
|
|
21
|
+
### CLASS\_NAME
|
|
22
|
+
|
|
23
|
+
> `readonly` `static` **CLASS\_NAME**: `string`
|
|
24
|
+
|
|
25
|
+
Runtime name for the class.
|
|
26
|
+
|
|
27
|
+
## Methods
|
|
28
|
+
|
|
29
|
+
### generate()
|
|
30
|
+
|
|
31
|
+
> `static` **generate**(`type`, `content`): `string`
|
|
32
|
+
|
|
33
|
+
Generate an integrity signature for the given content using the specified hash algorithm.
|
|
34
|
+
|
|
35
|
+
#### Parameters
|
|
36
|
+
|
|
37
|
+
##### type
|
|
38
|
+
|
|
39
|
+
[`IntegrityAlgorithm`](../type-aliases/IntegrityAlgorithm.md)
|
|
40
|
+
|
|
41
|
+
The hash algorithm to use, either "sha256", "sha384" or "sha512".
|
|
42
|
+
|
|
43
|
+
##### content
|
|
44
|
+
|
|
45
|
+
`Uint8Array`
|
|
46
|
+
|
|
47
|
+
The content to hash as a Uint8Array.
|
|
48
|
+
|
|
49
|
+
#### Returns
|
|
50
|
+
|
|
51
|
+
`string`
|
|
52
|
+
|
|
53
|
+
The integrity signature in the format "type-base64hash".
|
|
54
|
+
|
|
55
|
+
***
|
|
56
|
+
|
|
57
|
+
### verify()
|
|
58
|
+
|
|
59
|
+
> `static` **verify**(`integrity`, `content`): `boolean`
|
|
60
|
+
|
|
61
|
+
Verify an integrity signature for the given content.
|
|
62
|
+
|
|
63
|
+
#### Parameters
|
|
64
|
+
|
|
65
|
+
##### integrity
|
|
66
|
+
|
|
67
|
+
`string`
|
|
68
|
+
|
|
69
|
+
The integrity signature in the format "type-base64hash".
|
|
70
|
+
|
|
71
|
+
##### content
|
|
72
|
+
|
|
73
|
+
`Uint8Array`
|
|
74
|
+
|
|
75
|
+
The content to hash as a Uint8Array.
|
|
76
|
+
|
|
77
|
+
#### Returns
|
|
78
|
+
|
|
79
|
+
`boolean`
|
|
80
|
+
|
|
81
|
+
True if the integrity signature matches the content.
|
|
82
|
+
|
|
83
|
+
#### Throws
|
|
84
|
+
|
|
85
|
+
If the integrity signature is invalid.
|
|
@@ -12,6 +12,14 @@ Generate random passwords.
|
|
|
12
12
|
|
|
13
13
|
`PasswordGenerator`
|
|
14
14
|
|
|
15
|
+
## Properties
|
|
16
|
+
|
|
17
|
+
### CLASS\_NAME
|
|
18
|
+
|
|
19
|
+
> `readonly` `static` **CLASS\_NAME**: `string`
|
|
20
|
+
|
|
21
|
+
Runtime name for the class.
|
|
22
|
+
|
|
15
23
|
## Methods
|
|
16
24
|
|
|
17
25
|
### generate()
|
|
@@ -24,12 +32,40 @@ Generate a password of given length.
|
|
|
24
32
|
|
|
25
33
|
##### length
|
|
26
34
|
|
|
27
|
-
`number`
|
|
35
|
+
`number` = `PasswordGenerator._DEFAULT_MIN_PASSWORD_LENGTH`
|
|
28
36
|
|
|
29
|
-
The length of the password to generate.
|
|
37
|
+
The length of the password to generate, default to 15.
|
|
30
38
|
|
|
31
39
|
#### Returns
|
|
32
40
|
|
|
33
41
|
`string`
|
|
34
42
|
|
|
35
43
|
The random password.
|
|
44
|
+
|
|
45
|
+
***
|
|
46
|
+
|
|
47
|
+
### hashPassword()
|
|
48
|
+
|
|
49
|
+
> `static` **hashPassword**(`passwordBytes`, `saltBytes`): `Promise`\<`string`\>
|
|
50
|
+
|
|
51
|
+
Hash the password for the user.
|
|
52
|
+
|
|
53
|
+
#### Parameters
|
|
54
|
+
|
|
55
|
+
##### passwordBytes
|
|
56
|
+
|
|
57
|
+
`Uint8Array`
|
|
58
|
+
|
|
59
|
+
The password bytes.
|
|
60
|
+
|
|
61
|
+
##### saltBytes
|
|
62
|
+
|
|
63
|
+
`Uint8Array`
|
|
64
|
+
|
|
65
|
+
The salt bytes.
|
|
66
|
+
|
|
67
|
+
#### Returns
|
|
68
|
+
|
|
69
|
+
`Promise`\<`string`\>
|
|
70
|
+
|
|
71
|
+
The hashed password.
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
# Class: PasswordValidator
|
|
2
2
|
|
|
3
3
|
Test password strength.
|
|
4
|
-
|
|
4
|
+
|
|
5
|
+
## See
|
|
6
|
+
|
|
7
|
+
https://www.owasp.org/index.php/Authentication_Cheat_Sheet#Implement_Proper_Password_Strength_Controls .
|
|
5
8
|
|
|
6
9
|
## Constructors
|
|
7
10
|
|
|
@@ -13,6 +16,14 @@ Ref https://www.owasp.org/index.php/Authentication_Cheat_Sheet#Implement_Proper_
|
|
|
13
16
|
|
|
14
17
|
`PasswordValidator`
|
|
15
18
|
|
|
19
|
+
## Properties
|
|
20
|
+
|
|
21
|
+
### CLASS\_NAME
|
|
22
|
+
|
|
23
|
+
> `readonly` `static` **CLASS\_NAME**: `string`
|
|
24
|
+
|
|
25
|
+
Runtime name for the class.
|
|
26
|
+
|
|
16
27
|
## Methods
|
|
17
28
|
|
|
18
29
|
### validate()
|
|
@@ -49,7 +60,49 @@ Options to configure the testing.
|
|
|
49
60
|
|
|
50
61
|
`number`
|
|
51
62
|
|
|
52
|
-
The minimum length of the password, defaults to 8.
|
|
63
|
+
The minimum length of the password, defaults to 15, can be 8 if MFA is enabled.
|
|
64
|
+
|
|
65
|
+
###### maxLength?
|
|
66
|
+
|
|
67
|
+
`number`
|
|
68
|
+
|
|
69
|
+
The minimum length of the password, defaults to 128.
|
|
70
|
+
|
|
71
|
+
###### minPhraseLength?
|
|
72
|
+
|
|
73
|
+
`number`
|
|
74
|
+
|
|
75
|
+
The minimum length of the password for it to be considered a pass phrase.
|
|
76
|
+
|
|
77
|
+
#### Returns
|
|
78
|
+
|
|
79
|
+
`void`
|
|
80
|
+
|
|
81
|
+
***
|
|
82
|
+
|
|
83
|
+
### validatePassword()
|
|
84
|
+
|
|
85
|
+
> `static` **validatePassword**(`password`, `options?`): `void`
|
|
86
|
+
|
|
87
|
+
Validate the password against security policy.
|
|
88
|
+
|
|
89
|
+
#### Parameters
|
|
90
|
+
|
|
91
|
+
##### password
|
|
92
|
+
|
|
93
|
+
`string`
|
|
94
|
+
|
|
95
|
+
The password to validate.
|
|
96
|
+
|
|
97
|
+
##### options?
|
|
98
|
+
|
|
99
|
+
Options to configure the testing.
|
|
100
|
+
|
|
101
|
+
###### minLength?
|
|
102
|
+
|
|
103
|
+
`number`
|
|
104
|
+
|
|
105
|
+
The minimum length of the password, defaults to 15.
|
|
53
106
|
|
|
54
107
|
###### maxLength?
|
|
55
108
|
|
|
@@ -66,3 +119,63 @@ The minimum length of the password for it to be considered a pass phrase.
|
|
|
66
119
|
#### Returns
|
|
67
120
|
|
|
68
121
|
`void`
|
|
122
|
+
|
|
123
|
+
#### Throws
|
|
124
|
+
|
|
125
|
+
Error if the password does not meet the requirements.
|
|
126
|
+
|
|
127
|
+
***
|
|
128
|
+
|
|
129
|
+
### comparePasswordBytes()
|
|
130
|
+
|
|
131
|
+
> `static` **comparePasswordBytes**(`hashedPasswordBytes`, `storedPasswordBytes`): `boolean`
|
|
132
|
+
|
|
133
|
+
Compare two password byte arrays in constant time to prevent timing attacks.
|
|
134
|
+
|
|
135
|
+
#### Parameters
|
|
136
|
+
|
|
137
|
+
##### hashedPasswordBytes
|
|
138
|
+
|
|
139
|
+
`Uint8Array`
|
|
140
|
+
|
|
141
|
+
The computed password bytes to compare.
|
|
142
|
+
|
|
143
|
+
##### storedPasswordBytes
|
|
144
|
+
|
|
145
|
+
`Uint8Array`
|
|
146
|
+
|
|
147
|
+
The stored password bytes to compare against.
|
|
148
|
+
|
|
149
|
+
#### Returns
|
|
150
|
+
|
|
151
|
+
`boolean`
|
|
152
|
+
|
|
153
|
+
True if the bytes match, false otherwise.
|
|
154
|
+
|
|
155
|
+
***
|
|
156
|
+
|
|
157
|
+
### comparePasswordHashes()
|
|
158
|
+
|
|
159
|
+
> `static` **comparePasswordHashes**(`hashedPassword`, `storedPassword`): `boolean`
|
|
160
|
+
|
|
161
|
+
Compare two hashed passwords in constant time to prevent timing attacks.
|
|
162
|
+
|
|
163
|
+
#### Parameters
|
|
164
|
+
|
|
165
|
+
##### hashedPassword
|
|
166
|
+
|
|
167
|
+
`string`
|
|
168
|
+
|
|
169
|
+
The computed hash to compare.
|
|
170
|
+
|
|
171
|
+
##### storedPassword
|
|
172
|
+
|
|
173
|
+
`string`
|
|
174
|
+
|
|
175
|
+
The stored hash to compare against.
|
|
176
|
+
|
|
177
|
+
#### Returns
|
|
178
|
+
|
|
179
|
+
`boolean`
|
|
180
|
+
|
|
181
|
+
True if the hashes match, false otherwise.
|