@fgv/ts-web-extras-argon2 5.1.0-27 → 5.1.0-28
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/.rush/temp/698625805833a7df32519c2c5e59761be268f10e.tar.log +42 -0
- package/.rush/temp/chunked-rush-logs/ts-web-extras-argon2.build.chunks.jsonl +9 -0
- package/.rush/temp/operation/build/all.log +9 -0
- package/.rush/temp/operation/build/log-chunks.jsonl +9 -0
- package/.rush/temp/operation/build/state.json +3 -0
- package/dist/index.js +21 -0
- package/dist/index.js.map +1 -0
- package/dist/packlets/argon2/browserArgon2Provider.js +88 -0
- package/dist/packlets/argon2/browserArgon2Provider.js.map +1 -0
- package/dist/packlets/argon2/index.js +24 -0
- package/dist/packlets/argon2/index.js.map +1 -0
- package/dist/test/unit/argon2/browserArgon2Provider.test.js +96 -0
- package/dist/test/unit/argon2/browserArgon2Provider.test.js.map +1 -0
- package/dist/ts-web-extras-argon2.d.ts +40 -0
- package/dist/tsdoc-metadata.json +11 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +26 -0
- package/lib/index.js.map +1 -0
- package/lib/packlets/argon2/browserArgon2Provider.d.ts +36 -0
- package/lib/packlets/argon2/browserArgon2Provider.d.ts.map +1 -0
- package/lib/packlets/argon2/browserArgon2Provider.js +92 -0
- package/lib/packlets/argon2/browserArgon2Provider.js.map +1 -0
- package/lib/packlets/argon2/index.d.ts +3 -0
- package/lib/packlets/argon2/index.d.ts.map +1 -0
- package/lib/packlets/argon2/index.js +29 -0
- package/lib/packlets/argon2/index.js.map +1 -0
- package/lib/test/unit/argon2/browserArgon2Provider.test.d.ts +2 -0
- package/lib/test/unit/argon2/browserArgon2Provider.test.d.ts.map +1 -0
- package/lib/test/unit/argon2/browserArgon2Provider.test.js +98 -0
- package/lib/test/unit/argon2/browserArgon2Provider.test.js.map +1 -0
- package/package.json +19 -19
- package/rush-logs/ts-web-extras-argon2.build.cache.log +3 -0
- package/rush-logs/ts-web-extras-argon2.build.log +9 -0
- package/temp/build/lint/_eslint-5eVG3S6w.json +22 -0
- package/temp/build/typescript/ts_8nwakTlr.json +1 -0
- package/temp/ts-web-extras-argon2.api.json +382 -0
- package/temp/ts-web-extras-argon2.api.md +20 -0
|
@@ -0,0 +1,382 @@
|
|
|
1
|
+
{
|
|
2
|
+
"metadata": {
|
|
3
|
+
"toolPackage": "@microsoft/api-extractor",
|
|
4
|
+
"toolVersion": "7.58.7",
|
|
5
|
+
"schemaVersion": 1011,
|
|
6
|
+
"oldestForwardsCompatibleVersion": 1001,
|
|
7
|
+
"tsdocConfig": {
|
|
8
|
+
"$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json",
|
|
9
|
+
"noStandardTags": true,
|
|
10
|
+
"tagDefinitions": [
|
|
11
|
+
{
|
|
12
|
+
"tagName": "@alpha",
|
|
13
|
+
"syntaxKind": "modifier"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"tagName": "@beta",
|
|
17
|
+
"syntaxKind": "modifier"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"tagName": "@defaultValue",
|
|
21
|
+
"syntaxKind": "block"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"tagName": "@decorator",
|
|
25
|
+
"syntaxKind": "block",
|
|
26
|
+
"allowMultiple": true
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"tagName": "@deprecated",
|
|
30
|
+
"syntaxKind": "block"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"tagName": "@eventProperty",
|
|
34
|
+
"syntaxKind": "modifier"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"tagName": "@example",
|
|
38
|
+
"syntaxKind": "block",
|
|
39
|
+
"allowMultiple": true
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"tagName": "@experimental",
|
|
43
|
+
"syntaxKind": "modifier"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"tagName": "@inheritDoc",
|
|
47
|
+
"syntaxKind": "inline"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"tagName": "@internal",
|
|
51
|
+
"syntaxKind": "modifier"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"tagName": "@label",
|
|
55
|
+
"syntaxKind": "inline"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"tagName": "@link",
|
|
59
|
+
"syntaxKind": "inline",
|
|
60
|
+
"allowMultiple": true
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"tagName": "@override",
|
|
64
|
+
"syntaxKind": "modifier"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"tagName": "@packageDocumentation",
|
|
68
|
+
"syntaxKind": "modifier"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"tagName": "@param",
|
|
72
|
+
"syntaxKind": "block",
|
|
73
|
+
"allowMultiple": true
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"tagName": "@privateRemarks",
|
|
77
|
+
"syntaxKind": "block"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"tagName": "@public",
|
|
81
|
+
"syntaxKind": "modifier"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"tagName": "@readonly",
|
|
85
|
+
"syntaxKind": "modifier"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"tagName": "@remarks",
|
|
89
|
+
"syntaxKind": "block"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"tagName": "@returns",
|
|
93
|
+
"syntaxKind": "block"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"tagName": "@sealed",
|
|
97
|
+
"syntaxKind": "modifier"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"tagName": "@see",
|
|
101
|
+
"syntaxKind": "block"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"tagName": "@throws",
|
|
105
|
+
"syntaxKind": "block",
|
|
106
|
+
"allowMultiple": true
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"tagName": "@typeParam",
|
|
110
|
+
"syntaxKind": "block",
|
|
111
|
+
"allowMultiple": true
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"tagName": "@virtual",
|
|
115
|
+
"syntaxKind": "modifier"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"tagName": "@jsx",
|
|
119
|
+
"syntaxKind": "block"
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"tagName": "@jsxRuntime",
|
|
123
|
+
"syntaxKind": "block"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"tagName": "@jsxFrag",
|
|
127
|
+
"syntaxKind": "block"
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"tagName": "@jsxImportSource",
|
|
131
|
+
"syntaxKind": "block"
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"tagName": "@betaDocumentation",
|
|
135
|
+
"syntaxKind": "modifier"
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"tagName": "@internalRemarks",
|
|
139
|
+
"syntaxKind": "block"
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"tagName": "@preapproved",
|
|
143
|
+
"syntaxKind": "modifier"
|
|
144
|
+
}
|
|
145
|
+
],
|
|
146
|
+
"supportForTags": {
|
|
147
|
+
"@alpha": true,
|
|
148
|
+
"@beta": true,
|
|
149
|
+
"@defaultValue": true,
|
|
150
|
+
"@decorator": true,
|
|
151
|
+
"@deprecated": true,
|
|
152
|
+
"@eventProperty": true,
|
|
153
|
+
"@example": true,
|
|
154
|
+
"@experimental": true,
|
|
155
|
+
"@inheritDoc": true,
|
|
156
|
+
"@internal": true,
|
|
157
|
+
"@label": true,
|
|
158
|
+
"@link": true,
|
|
159
|
+
"@override": true,
|
|
160
|
+
"@packageDocumentation": true,
|
|
161
|
+
"@param": true,
|
|
162
|
+
"@privateRemarks": true,
|
|
163
|
+
"@public": true,
|
|
164
|
+
"@readonly": true,
|
|
165
|
+
"@remarks": true,
|
|
166
|
+
"@returns": true,
|
|
167
|
+
"@sealed": true,
|
|
168
|
+
"@see": true,
|
|
169
|
+
"@throws": true,
|
|
170
|
+
"@typeParam": true,
|
|
171
|
+
"@virtual": true,
|
|
172
|
+
"@betaDocumentation": true,
|
|
173
|
+
"@internalRemarks": true,
|
|
174
|
+
"@preapproved": true
|
|
175
|
+
},
|
|
176
|
+
"reportUnsupportedHtmlElements": false
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
"kind": "Package",
|
|
180
|
+
"canonicalReference": "@fgv/ts-web-extras-argon2!",
|
|
181
|
+
"docComment": "",
|
|
182
|
+
"name": "@fgv/ts-web-extras-argon2",
|
|
183
|
+
"preserveMemberOrder": false,
|
|
184
|
+
"members": [
|
|
185
|
+
{
|
|
186
|
+
"kind": "EntryPoint",
|
|
187
|
+
"canonicalReference": "@fgv/ts-web-extras-argon2!",
|
|
188
|
+
"name": "",
|
|
189
|
+
"preserveMemberOrder": false,
|
|
190
|
+
"members": [
|
|
191
|
+
{
|
|
192
|
+
"kind": "Class",
|
|
193
|
+
"canonicalReference": "@fgv/ts-web-extras-argon2!BrowserArgon2Provider:class",
|
|
194
|
+
"docComment": "/**\n * Browser (and Node) implementation of {@link @fgv/ts-extras#IArgon2idProvider} backed by `hash-wasm` (pure WASM — no Web Crypto dependency). Runs identically in both Node and browser environments, enabling cross-runtime test equivalence.\n *\n * @public\n */\n",
|
|
195
|
+
"excerptTokens": [
|
|
196
|
+
{
|
|
197
|
+
"kind": "Content",
|
|
198
|
+
"text": "export declare class BrowserArgon2Provider implements "
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
"kind": "Reference",
|
|
202
|
+
"text": "CryptoUtils.IArgon2idProvider",
|
|
203
|
+
"canonicalReference": "@fgv/ts-extras!IArgon2idProvider:interface"
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
"kind": "Content",
|
|
207
|
+
"text": " "
|
|
208
|
+
}
|
|
209
|
+
],
|
|
210
|
+
"fileUrlPath": "src/packlets/argon2/browserArgon2Provider.ts",
|
|
211
|
+
"releaseTag": "Public",
|
|
212
|
+
"isAbstract": false,
|
|
213
|
+
"name": "BrowserArgon2Provider",
|
|
214
|
+
"preserveMemberOrder": false,
|
|
215
|
+
"members": [
|
|
216
|
+
{
|
|
217
|
+
"kind": "Method",
|
|
218
|
+
"canonicalReference": "@fgv/ts-web-extras-argon2!BrowserArgon2Provider#argon2id:member(1)",
|
|
219
|
+
"docComment": "/**\n * Derives a key using Argon2id via the hash-wasm WASM implementation.\n *\n * @remarks\n *\n * `hash-wasm` computes Argon2id sequentially regardless of the `parallelism` value — the WASM engine does not spawn worker threads. The `parallelism` value IS still wired into the hash computation; output bytes differ for different parallelism values. For interoperability with server-side Node derivations, ensure both sides use the same `parallelism` value (recommend `parallelism: 1` unless compatibility requires otherwise).\n *\n * @param password - The password or passphrase (string or raw bytes).\n *\n * @param salt - The salt (must be at least 8 bytes; 16+ bytes recommended).\n *\n * @param params - Argon2id parameters. All values are validated before derivation.\n *\n * @returns Success with the derived key bytes, or Failure with a descriptive message.\n *\n * @public\n */\n",
|
|
220
|
+
"excerptTokens": [
|
|
221
|
+
{
|
|
222
|
+
"kind": "Content",
|
|
223
|
+
"text": "argon2id(password: "
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
"kind": "Reference",
|
|
227
|
+
"text": "Uint8Array",
|
|
228
|
+
"canonicalReference": "!Uint8Array:interface"
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
"kind": "Content",
|
|
232
|
+
"text": " | string"
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
"kind": "Content",
|
|
236
|
+
"text": ", salt: "
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
"kind": "Reference",
|
|
240
|
+
"text": "Uint8Array",
|
|
241
|
+
"canonicalReference": "!Uint8Array:interface"
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
"kind": "Content",
|
|
245
|
+
"text": ", params: "
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
"kind": "Reference",
|
|
249
|
+
"text": "CryptoUtils.IArgon2idParams",
|
|
250
|
+
"canonicalReference": "@fgv/ts-extras!IArgon2idParams:interface"
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
"kind": "Content",
|
|
254
|
+
"text": "): "
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
"kind": "Reference",
|
|
258
|
+
"text": "Promise",
|
|
259
|
+
"canonicalReference": "!Promise:interface"
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
"kind": "Content",
|
|
263
|
+
"text": "<"
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
"kind": "Reference",
|
|
267
|
+
"text": "Result",
|
|
268
|
+
"canonicalReference": "@fgv/ts-utils!Result:type"
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
"kind": "Content",
|
|
272
|
+
"text": "<"
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
"kind": "Reference",
|
|
276
|
+
"text": "Uint8Array",
|
|
277
|
+
"canonicalReference": "!Uint8Array:interface"
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
"kind": "Content",
|
|
281
|
+
"text": ">>"
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
"kind": "Content",
|
|
285
|
+
"text": ";"
|
|
286
|
+
}
|
|
287
|
+
],
|
|
288
|
+
"isStatic": false,
|
|
289
|
+
"returnTypeTokenRange": {
|
|
290
|
+
"startIndex": 8,
|
|
291
|
+
"endIndex": 14
|
|
292
|
+
},
|
|
293
|
+
"releaseTag": "Public",
|
|
294
|
+
"isProtected": false,
|
|
295
|
+
"overloadIndex": 1,
|
|
296
|
+
"parameters": [
|
|
297
|
+
{
|
|
298
|
+
"parameterName": "password",
|
|
299
|
+
"parameterTypeTokenRange": {
|
|
300
|
+
"startIndex": 1,
|
|
301
|
+
"endIndex": 3
|
|
302
|
+
},
|
|
303
|
+
"isOptional": false
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
"parameterName": "salt",
|
|
307
|
+
"parameterTypeTokenRange": {
|
|
308
|
+
"startIndex": 4,
|
|
309
|
+
"endIndex": 5
|
|
310
|
+
},
|
|
311
|
+
"isOptional": false
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
"parameterName": "params",
|
|
315
|
+
"parameterTypeTokenRange": {
|
|
316
|
+
"startIndex": 6,
|
|
317
|
+
"endIndex": 7
|
|
318
|
+
},
|
|
319
|
+
"isOptional": false
|
|
320
|
+
}
|
|
321
|
+
],
|
|
322
|
+
"isOptional": false,
|
|
323
|
+
"isAbstract": false,
|
|
324
|
+
"name": "argon2id"
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
"kind": "Method",
|
|
328
|
+
"canonicalReference": "@fgv/ts-web-extras-argon2!BrowserArgon2Provider.create:member(1)",
|
|
329
|
+
"docComment": "/**\n * Creates a new {@link BrowserArgon2Provider} instance.\n *\n * @returns Success with a new provider instance.\n *\n * @public\n */\n",
|
|
330
|
+
"excerptTokens": [
|
|
331
|
+
{
|
|
332
|
+
"kind": "Content",
|
|
333
|
+
"text": "static create(): "
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
"kind": "Reference",
|
|
337
|
+
"text": "Result",
|
|
338
|
+
"canonicalReference": "@fgv/ts-utils!Result:type"
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
"kind": "Content",
|
|
342
|
+
"text": "<"
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
"kind": "Reference",
|
|
346
|
+
"text": "BrowserArgon2Provider",
|
|
347
|
+
"canonicalReference": "@fgv/ts-web-extras-argon2!BrowserArgon2Provider:class"
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
"kind": "Content",
|
|
351
|
+
"text": ">"
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
"kind": "Content",
|
|
355
|
+
"text": ";"
|
|
356
|
+
}
|
|
357
|
+
],
|
|
358
|
+
"isStatic": true,
|
|
359
|
+
"returnTypeTokenRange": {
|
|
360
|
+
"startIndex": 1,
|
|
361
|
+
"endIndex": 5
|
|
362
|
+
},
|
|
363
|
+
"releaseTag": "Public",
|
|
364
|
+
"isProtected": false,
|
|
365
|
+
"overloadIndex": 1,
|
|
366
|
+
"parameters": [],
|
|
367
|
+
"isOptional": false,
|
|
368
|
+
"isAbstract": false,
|
|
369
|
+
"name": "create"
|
|
370
|
+
}
|
|
371
|
+
],
|
|
372
|
+
"implementsTokenRanges": [
|
|
373
|
+
{
|
|
374
|
+
"startIndex": 1,
|
|
375
|
+
"endIndex": 2
|
|
376
|
+
}
|
|
377
|
+
]
|
|
378
|
+
}
|
|
379
|
+
]
|
|
380
|
+
}
|
|
381
|
+
]
|
|
382
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
## API Report File for "@fgv/ts-web-extras-argon2"
|
|
2
|
+
|
|
3
|
+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
|
|
7
|
+
import { CryptoUtils } from '@fgv/ts-extras';
|
|
8
|
+
import { Result } from '@fgv/ts-utils';
|
|
9
|
+
|
|
10
|
+
// @public
|
|
11
|
+
export class BrowserArgon2Provider implements CryptoUtils.IArgon2idProvider {
|
|
12
|
+
argon2id(password: Uint8Array | string, salt: Uint8Array, params: CryptoUtils.IArgon2idParams): Promise<Result<Uint8Array>>;
|
|
13
|
+
static create(): Result<BrowserArgon2Provider>;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export { CryptoUtils }
|
|
17
|
+
|
|
18
|
+
// (No @packageDocumentation comment for this package)
|
|
19
|
+
|
|
20
|
+
```
|