@twin.org/crypto 0.0.3-next.21 → 0.0.3-next.23
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/README.md +1 -11
- package/docs/changelog.md +39 -1
- package/docs/examples.md +130 -1
- package/docs/reference/classes/Bech32.md +4 -4
- package/docs/reference/classes/Bip32Path.md +6 -6
- package/docs/reference/classes/Bip39.md +16 -16
- package/docs/reference/classes/Bip44.md +6 -6
- package/docs/reference/classes/Blake2b.md +9 -9
- package/docs/reference/classes/Blake3.md +7 -7
- package/docs/reference/classes/ChaCha20Poly1305.md +3 -3
- package/docs/reference/classes/Ed25519.md +8 -8
- package/docs/reference/classes/HmacSha1.md +4 -4
- package/docs/reference/classes/HmacSha256.md +9 -9
- package/docs/reference/classes/HmacSha512.md +13 -13
- package/docs/reference/classes/Hotp.md +2 -2
- package/docs/reference/classes/IntegrityHelper.md +3 -3
- package/docs/reference/classes/PasswordGenerator.md +5 -5
- package/docs/reference/classes/PasswordValidator.md +5 -5
- package/docs/reference/classes/Pbkdf2.md +3 -3
- package/docs/reference/classes/PemHelper.md +5 -5
- package/docs/reference/classes/Secp256k1.md +6 -6
- package/docs/reference/classes/Sha1.md +4 -4
- package/docs/reference/classes/Sha256.md +9 -9
- package/docs/reference/classes/Sha3.md +13 -13
- package/docs/reference/classes/Sha512.md +13 -13
- package/docs/reference/classes/Slip0010.md +11 -11
- package/docs/reference/classes/Totp.md +12 -12
- package/docs/reference/classes/X25519.md +3 -3
- package/docs/reference/classes/Zip215.md +2 -2
- package/docs/reference/variables/IntegrityAlgorithm.md +3 -3
- package/docs/reference/variables/KeyType.md +2 -2
- package/package.json +6 -6
|
@@ -24,7 +24,7 @@ The key for the hmac.
|
|
|
24
24
|
|
|
25
25
|
## Properties
|
|
26
26
|
|
|
27
|
-
### CLASS\_NAME
|
|
27
|
+
### CLASS\_NAME {#class_name}
|
|
28
28
|
|
|
29
29
|
> `readonly` `static` **CLASS\_NAME**: `string`
|
|
30
30
|
|
|
@@ -32,7 +32,7 @@ Runtime name for the class.
|
|
|
32
32
|
|
|
33
33
|
## Methods
|
|
34
34
|
|
|
35
|
-
### sum()
|
|
35
|
+
### sum() {#sum}
|
|
36
36
|
|
|
37
37
|
> `static` **sum**(`key`, `block`): `Uint8Array`
|
|
38
38
|
|
|
@@ -60,7 +60,7 @@ The sum of the block.
|
|
|
60
60
|
|
|
61
61
|
***
|
|
62
62
|
|
|
63
|
-
### update()
|
|
63
|
+
### update() {#update}
|
|
64
64
|
|
|
65
65
|
> **update**(`block`): `HmacSha1`
|
|
66
66
|
|
|
@@ -82,7 +82,7 @@ The instance for chaining.
|
|
|
82
82
|
|
|
83
83
|
***
|
|
84
84
|
|
|
85
|
-
### digest()
|
|
85
|
+
### digest() {#digest}
|
|
86
86
|
|
|
87
87
|
> **digest**(): `Uint8Array`
|
|
88
88
|
|
|
@@ -6,7 +6,7 @@ Class to help with HmacSha256 scheme.
|
|
|
6
6
|
|
|
7
7
|
### Constructor
|
|
8
8
|
|
|
9
|
-
> **new HmacSha256**(`key`, `bits
|
|
9
|
+
> **new HmacSha256**(`key`, `bits?`): `HmacSha256`
|
|
10
10
|
|
|
11
11
|
Create a new instance of HmacSha256.
|
|
12
12
|
|
|
@@ -18,7 +18,7 @@ Create a new instance of HmacSha256.
|
|
|
18
18
|
|
|
19
19
|
The key for the hmac.
|
|
20
20
|
|
|
21
|
-
##### bits
|
|
21
|
+
##### bits?
|
|
22
22
|
|
|
23
23
|
`number` = `HmacSha256.SIZE_256`
|
|
24
24
|
|
|
@@ -30,7 +30,7 @@ The number of bits.
|
|
|
30
30
|
|
|
31
31
|
## Properties
|
|
32
32
|
|
|
33
|
-
### SIZE\_256
|
|
33
|
+
### SIZE\_256 {#size_256}
|
|
34
34
|
|
|
35
35
|
> `readonly` `static` **SIZE\_256**: `number` = `256`
|
|
36
36
|
|
|
@@ -38,7 +38,7 @@ Sha256 256.
|
|
|
38
38
|
|
|
39
39
|
***
|
|
40
40
|
|
|
41
|
-
### SIZE\_224
|
|
41
|
+
### SIZE\_224 {#size_224}
|
|
42
42
|
|
|
43
43
|
> `readonly` `static` **SIZE\_224**: `number` = `224`
|
|
44
44
|
|
|
@@ -46,7 +46,7 @@ Sha256 224.
|
|
|
46
46
|
|
|
47
47
|
***
|
|
48
48
|
|
|
49
|
-
### CLASS\_NAME
|
|
49
|
+
### CLASS\_NAME {#class_name}
|
|
50
50
|
|
|
51
51
|
> `readonly` `static` **CLASS\_NAME**: `string`
|
|
52
52
|
|
|
@@ -54,7 +54,7 @@ Runtime name for the class.
|
|
|
54
54
|
|
|
55
55
|
## Methods
|
|
56
56
|
|
|
57
|
-
### sum224()
|
|
57
|
+
### sum224() {#sum224}
|
|
58
58
|
|
|
59
59
|
> `static` **sum224**(`key`, `block`): `Uint8Array`
|
|
60
60
|
|
|
@@ -82,7 +82,7 @@ The sum 224 of the block.
|
|
|
82
82
|
|
|
83
83
|
***
|
|
84
84
|
|
|
85
|
-
### sum256()
|
|
85
|
+
### sum256() {#sum256}
|
|
86
86
|
|
|
87
87
|
> `static` **sum256**(`key`, `block`): `Uint8Array`
|
|
88
88
|
|
|
@@ -110,7 +110,7 @@ The sum 256 of the block.
|
|
|
110
110
|
|
|
111
111
|
***
|
|
112
112
|
|
|
113
|
-
### update()
|
|
113
|
+
### update() {#update}
|
|
114
114
|
|
|
115
115
|
> **update**(`block`): `HmacSha256`
|
|
116
116
|
|
|
@@ -132,7 +132,7 @@ The instance for chaining.
|
|
|
132
132
|
|
|
133
133
|
***
|
|
134
134
|
|
|
135
|
-
### digest()
|
|
135
|
+
### digest() {#digest}
|
|
136
136
|
|
|
137
137
|
> **digest**(): `Uint8Array`
|
|
138
138
|
|
|
@@ -6,7 +6,7 @@ Class to help with HmacSha512 scheme.
|
|
|
6
6
|
|
|
7
7
|
### Constructor
|
|
8
8
|
|
|
9
|
-
> **new HmacSha512**(`key`, `bits
|
|
9
|
+
> **new HmacSha512**(`key`, `bits?`): `HmacSha512`
|
|
10
10
|
|
|
11
11
|
Create a new instance of HmacSha512.
|
|
12
12
|
|
|
@@ -18,7 +18,7 @@ Create a new instance of HmacSha512.
|
|
|
18
18
|
|
|
19
19
|
The key for the hmac.
|
|
20
20
|
|
|
21
|
-
##### bits
|
|
21
|
+
##### bits?
|
|
22
22
|
|
|
23
23
|
`number` = `HmacSha512.SIZE_512`
|
|
24
24
|
|
|
@@ -30,7 +30,7 @@ The number of bits.
|
|
|
30
30
|
|
|
31
31
|
## Properties
|
|
32
32
|
|
|
33
|
-
### SIZE\_224
|
|
33
|
+
### SIZE\_224 {#size_224}
|
|
34
34
|
|
|
35
35
|
> `static` **SIZE\_224**: `number` = `224`
|
|
36
36
|
|
|
@@ -38,7 +38,7 @@ Sha512 224.
|
|
|
38
38
|
|
|
39
39
|
***
|
|
40
40
|
|
|
41
|
-
### SIZE\_256
|
|
41
|
+
### SIZE\_256 {#size_256}
|
|
42
42
|
|
|
43
43
|
> `static` **SIZE\_256**: `number` = `256`
|
|
44
44
|
|
|
@@ -46,7 +46,7 @@ Sha512 256.
|
|
|
46
46
|
|
|
47
47
|
***
|
|
48
48
|
|
|
49
|
-
### SIZE\_384
|
|
49
|
+
### SIZE\_384 {#size_384}
|
|
50
50
|
|
|
51
51
|
> `static` **SIZE\_384**: `number` = `384`
|
|
52
52
|
|
|
@@ -54,7 +54,7 @@ Sha512 384.
|
|
|
54
54
|
|
|
55
55
|
***
|
|
56
56
|
|
|
57
|
-
### SIZE\_512
|
|
57
|
+
### SIZE\_512 {#size_512}
|
|
58
58
|
|
|
59
59
|
> `static` **SIZE\_512**: `number` = `512`
|
|
60
60
|
|
|
@@ -62,7 +62,7 @@ Sha512 512.
|
|
|
62
62
|
|
|
63
63
|
***
|
|
64
64
|
|
|
65
|
-
### CLASS\_NAME
|
|
65
|
+
### CLASS\_NAME {#class_name}
|
|
66
66
|
|
|
67
67
|
> `readonly` `static` **CLASS\_NAME**: `string`
|
|
68
68
|
|
|
@@ -70,7 +70,7 @@ Runtime name for the class.
|
|
|
70
70
|
|
|
71
71
|
## Methods
|
|
72
72
|
|
|
73
|
-
### sum512()
|
|
73
|
+
### sum512() {#sum512}
|
|
74
74
|
|
|
75
75
|
> `static` **sum512**(`key`, `block`): `Uint8Array`
|
|
76
76
|
|
|
@@ -98,7 +98,7 @@ The sum 512 of the block.
|
|
|
98
98
|
|
|
99
99
|
***
|
|
100
100
|
|
|
101
|
-
### sum384()
|
|
101
|
+
### sum384() {#sum384}
|
|
102
102
|
|
|
103
103
|
> `static` **sum384**(`key`, `block`): `Uint8Array`
|
|
104
104
|
|
|
@@ -126,7 +126,7 @@ The sum 384 of the block.
|
|
|
126
126
|
|
|
127
127
|
***
|
|
128
128
|
|
|
129
|
-
### sum256()
|
|
129
|
+
### sum256() {#sum256}
|
|
130
130
|
|
|
131
131
|
> `static` **sum256**(`key`, `block`): `Uint8Array`
|
|
132
132
|
|
|
@@ -154,7 +154,7 @@ The sum 256 of the block.
|
|
|
154
154
|
|
|
155
155
|
***
|
|
156
156
|
|
|
157
|
-
### sum224()
|
|
157
|
+
### sum224() {#sum224}
|
|
158
158
|
|
|
159
159
|
> `static` **sum224**(`key`, `block`): `Uint8Array`
|
|
160
160
|
|
|
@@ -182,7 +182,7 @@ The sum 224 of the block.
|
|
|
182
182
|
|
|
183
183
|
***
|
|
184
184
|
|
|
185
|
-
### update()
|
|
185
|
+
### update() {#update}
|
|
186
186
|
|
|
187
187
|
> **update**(`block`): `HmacSha512`
|
|
188
188
|
|
|
@@ -204,7 +204,7 @@ The instance for chaining.
|
|
|
204
204
|
|
|
205
205
|
***
|
|
206
206
|
|
|
207
|
-
### digest()
|
|
207
|
+
### digest() {#digest}
|
|
208
208
|
|
|
209
209
|
> **digest**(): `Uint8Array`
|
|
210
210
|
|
|
@@ -15,7 +15,7 @@ Implementation of https://datatracker.ietf.org/doc/html/rfc4226 .
|
|
|
15
15
|
|
|
16
16
|
## Properties
|
|
17
17
|
|
|
18
|
-
### CLASS\_NAME
|
|
18
|
+
### CLASS\_NAME {#class_name}
|
|
19
19
|
|
|
20
20
|
> `readonly` `static` **CLASS\_NAME**: `string`
|
|
21
21
|
|
|
@@ -23,7 +23,7 @@ Runtime name for the class.
|
|
|
23
23
|
|
|
24
24
|
## Methods
|
|
25
25
|
|
|
26
|
-
### generate()
|
|
26
|
+
### generate() {#generate}
|
|
27
27
|
|
|
28
28
|
> `static` **generate**(`key`, `counter`): `string`
|
|
29
29
|
|
|
@@ -18,7 +18,7 @@ https://www.w3.org/TR/SRI/
|
|
|
18
18
|
|
|
19
19
|
## Properties
|
|
20
20
|
|
|
21
|
-
### CLASS\_NAME
|
|
21
|
+
### CLASS\_NAME {#class_name}
|
|
22
22
|
|
|
23
23
|
> `readonly` `static` **CLASS\_NAME**: `string`
|
|
24
24
|
|
|
@@ -26,7 +26,7 @@ Runtime name for the class.
|
|
|
26
26
|
|
|
27
27
|
## Methods
|
|
28
28
|
|
|
29
|
-
### generate()
|
|
29
|
+
### generate() {#generate}
|
|
30
30
|
|
|
31
31
|
> `static` **generate**(`type`, `content`): `string`
|
|
32
32
|
|
|
@@ -54,7 +54,7 @@ The integrity signature in the format "type-base64hash".
|
|
|
54
54
|
|
|
55
55
|
***
|
|
56
56
|
|
|
57
|
-
### verify()
|
|
57
|
+
### verify() {#verify}
|
|
58
58
|
|
|
59
59
|
> `static` **verify**(`integrity`, `content`): `boolean`
|
|
60
60
|
|
|
@@ -14,7 +14,7 @@ Generate random passwords.
|
|
|
14
14
|
|
|
15
15
|
## Properties
|
|
16
16
|
|
|
17
|
-
### CLASS\_NAME
|
|
17
|
+
### CLASS\_NAME {#class_name}
|
|
18
18
|
|
|
19
19
|
> `readonly` `static` **CLASS\_NAME**: `string`
|
|
20
20
|
|
|
@@ -22,15 +22,15 @@ Runtime name for the class.
|
|
|
22
22
|
|
|
23
23
|
## Methods
|
|
24
24
|
|
|
25
|
-
### generate()
|
|
25
|
+
### generate() {#generate}
|
|
26
26
|
|
|
27
|
-
> `static` **generate**(`length
|
|
27
|
+
> `static` **generate**(`length?`): `string`
|
|
28
28
|
|
|
29
29
|
Generate a password of given length.
|
|
30
30
|
|
|
31
31
|
#### Parameters
|
|
32
32
|
|
|
33
|
-
##### length
|
|
33
|
+
##### length?
|
|
34
34
|
|
|
35
35
|
`number` = `PasswordGenerator._DEFAULT_MIN_PASSWORD_LENGTH`
|
|
36
36
|
|
|
@@ -44,7 +44,7 @@ The random password.
|
|
|
44
44
|
|
|
45
45
|
***
|
|
46
46
|
|
|
47
|
-
### hashPassword()
|
|
47
|
+
### hashPassword() {#hashpassword}
|
|
48
48
|
|
|
49
49
|
> `static` **hashPassword**(`passwordBytes`, `saltBytes`): `Promise`\<`string`\>
|
|
50
50
|
|
|
@@ -18,7 +18,7 @@ https://www.owasp.org/index.php/Authentication_Cheat_Sheet#Implement_Proper_Pass
|
|
|
18
18
|
|
|
19
19
|
## Properties
|
|
20
20
|
|
|
21
|
-
### CLASS\_NAME
|
|
21
|
+
### CLASS\_NAME {#class_name}
|
|
22
22
|
|
|
23
23
|
> `readonly` `static` **CLASS\_NAME**: `string`
|
|
24
24
|
|
|
@@ -26,7 +26,7 @@ Runtime name for the class.
|
|
|
26
26
|
|
|
27
27
|
## Methods
|
|
28
28
|
|
|
29
|
-
### validate()
|
|
29
|
+
### validate() {#validate}
|
|
30
30
|
|
|
31
31
|
> `static` **validate**(`property`, `password`, `failures`, `options?`): `void`
|
|
32
32
|
|
|
@@ -80,7 +80,7 @@ The minimum length of the password for it to be considered a pass phrase.
|
|
|
80
80
|
|
|
81
81
|
***
|
|
82
82
|
|
|
83
|
-
### validatePassword()
|
|
83
|
+
### validatePassword() {#validatepassword}
|
|
84
84
|
|
|
85
85
|
> `static` **validatePassword**(`password`, `options?`): `void`
|
|
86
86
|
|
|
@@ -126,7 +126,7 @@ Error if the password does not meet the requirements.
|
|
|
126
126
|
|
|
127
127
|
***
|
|
128
128
|
|
|
129
|
-
### comparePasswordBytes()
|
|
129
|
+
### comparePasswordBytes() {#comparepasswordbytes}
|
|
130
130
|
|
|
131
131
|
> `static` **comparePasswordBytes**(`hashedPasswordBytes`, `storedPasswordBytes`): `boolean`
|
|
132
132
|
|
|
@@ -154,7 +154,7 @@ True if the bytes match, false otherwise.
|
|
|
154
154
|
|
|
155
155
|
***
|
|
156
156
|
|
|
157
|
-
### comparePasswordHashes()
|
|
157
|
+
### comparePasswordHashes() {#comparepasswordhashes}
|
|
158
158
|
|
|
159
159
|
> `static` **comparePasswordHashes**(`hashedPassword`, `storedPassword`): `boolean`
|
|
160
160
|
|
|
@@ -14,7 +14,7 @@ Implementation of the password based key derivation function 2.
|
|
|
14
14
|
|
|
15
15
|
## Properties
|
|
16
16
|
|
|
17
|
-
### CLASS\_NAME
|
|
17
|
+
### CLASS\_NAME {#class_name}
|
|
18
18
|
|
|
19
19
|
> `readonly` `static` **CLASS\_NAME**: `string`
|
|
20
20
|
|
|
@@ -22,7 +22,7 @@ Runtime name for the class.
|
|
|
22
22
|
|
|
23
23
|
## Methods
|
|
24
24
|
|
|
25
|
-
### sha256()
|
|
25
|
+
### sha256() {#sha256}
|
|
26
26
|
|
|
27
27
|
> `static` **sha256**(`password`, `salt`, `iterations`, `keyLength`): `Uint8Array`
|
|
28
28
|
|
|
@@ -62,7 +62,7 @@ The derived key.
|
|
|
62
62
|
|
|
63
63
|
***
|
|
64
64
|
|
|
65
|
-
### sha512()
|
|
65
|
+
### sha512() {#sha512}
|
|
66
66
|
|
|
67
67
|
> `static` **sha512**(`password`, `salt`, `iterations`, `keyLength`): `Uint8Array`
|
|
68
68
|
|
|
@@ -14,7 +14,7 @@ Helper class for working with PEM (Privacy-Enhanced Mail) formatted data.
|
|
|
14
14
|
|
|
15
15
|
## Properties
|
|
16
16
|
|
|
17
|
-
### CLASS\_NAME
|
|
17
|
+
### CLASS\_NAME {#class_name}
|
|
18
18
|
|
|
19
19
|
> `readonly` `static` **CLASS\_NAME**: `string`
|
|
20
20
|
|
|
@@ -22,7 +22,7 @@ Runtime name for the class.
|
|
|
22
22
|
|
|
23
23
|
## Methods
|
|
24
24
|
|
|
25
|
-
### stripPemMarkers()
|
|
25
|
+
### stripPemMarkers() {#strippemmarkers}
|
|
26
26
|
|
|
27
27
|
> `static` **stripPemMarkers**(`pemContent`): `string`
|
|
28
28
|
|
|
@@ -44,9 +44,9 @@ The stripped PEM content in bas64 format.
|
|
|
44
44
|
|
|
45
45
|
***
|
|
46
46
|
|
|
47
|
-
### formatPem()
|
|
47
|
+
### formatPem() {#formatpem}
|
|
48
48
|
|
|
49
|
-
> `static` **formatPem**(`marker`, `base64Content`, `lineLength
|
|
49
|
+
> `static` **formatPem**(`marker`, `base64Content`, `lineLength?`): `string`
|
|
50
50
|
|
|
51
51
|
Format the PEM content to have a specific line length.
|
|
52
52
|
|
|
@@ -64,7 +64,7 @@ The marker for the PEM content, e.g. RSA PRIVATE KEY
|
|
|
64
64
|
|
|
65
65
|
The base64 content to format.
|
|
66
66
|
|
|
67
|
-
##### lineLength
|
|
67
|
+
##### lineLength?
|
|
68
68
|
|
|
69
69
|
`number` = `64`
|
|
70
70
|
|
|
@@ -14,7 +14,7 @@ Implementation of secp256k1.
|
|
|
14
14
|
|
|
15
15
|
## Properties
|
|
16
16
|
|
|
17
|
-
### PRIVATE\_KEY\_SIZE
|
|
17
|
+
### PRIVATE\_KEY\_SIZE {#private_key_size}
|
|
18
18
|
|
|
19
19
|
> `static` **PRIVATE\_KEY\_SIZE**: `number` = `32`
|
|
20
20
|
|
|
@@ -22,7 +22,7 @@ Private Key Size is the size, in bytes, of private keys as used in this package.
|
|
|
22
22
|
|
|
23
23
|
***
|
|
24
24
|
|
|
25
|
-
### PUBLIC\_KEY\_SIZE
|
|
25
|
+
### PUBLIC\_KEY\_SIZE {#public_key_size}
|
|
26
26
|
|
|
27
27
|
> `static` **PUBLIC\_KEY\_SIZE**: `number` = `33`
|
|
28
28
|
|
|
@@ -30,7 +30,7 @@ Public Key Size is the size, in bytes, of public keys as used in this package.
|
|
|
30
30
|
|
|
31
31
|
***
|
|
32
32
|
|
|
33
|
-
### CLASS\_NAME
|
|
33
|
+
### CLASS\_NAME {#class_name}
|
|
34
34
|
|
|
35
35
|
> `readonly` `static` **CLASS\_NAME**: `string`
|
|
36
36
|
|
|
@@ -38,7 +38,7 @@ Runtime name for the class.
|
|
|
38
38
|
|
|
39
39
|
## Methods
|
|
40
40
|
|
|
41
|
-
### publicKeyFromPrivateKey()
|
|
41
|
+
### publicKeyFromPrivateKey() {#publickeyfromprivatekey}
|
|
42
42
|
|
|
43
43
|
> `static` **publicKeyFromPrivateKey**(`privateKey`): `Uint8Array`
|
|
44
44
|
|
|
@@ -64,7 +64,7 @@ Error if the private key is not the correct length.
|
|
|
64
64
|
|
|
65
65
|
***
|
|
66
66
|
|
|
67
|
-
### sign()
|
|
67
|
+
### sign() {#sign}
|
|
68
68
|
|
|
69
69
|
> `static` **sign**(`privateKey`, `block`): `Uint8Array`
|
|
70
70
|
|
|
@@ -96,7 +96,7 @@ Error if the private key is not the correct length.
|
|
|
96
96
|
|
|
97
97
|
***
|
|
98
98
|
|
|
99
|
-
### verify()
|
|
99
|
+
### verify() {#verify}
|
|
100
100
|
|
|
101
101
|
> `static` **verify**(`publicKey`, `block`, `signature`): `boolean`
|
|
102
102
|
|
|
@@ -16,7 +16,7 @@ Create a new instance of Sha1.
|
|
|
16
16
|
|
|
17
17
|
## Properties
|
|
18
18
|
|
|
19
|
-
### CLASS\_NAME
|
|
19
|
+
### CLASS\_NAME {#class_name}
|
|
20
20
|
|
|
21
21
|
> `readonly` `static` **CLASS\_NAME**: `string`
|
|
22
22
|
|
|
@@ -24,7 +24,7 @@ Runtime name for the class.
|
|
|
24
24
|
|
|
25
25
|
## Methods
|
|
26
26
|
|
|
27
|
-
### sum()
|
|
27
|
+
### sum() {#sum}
|
|
28
28
|
|
|
29
29
|
> `static` **sum**(`block`): `Uint8Array`
|
|
30
30
|
|
|
@@ -46,7 +46,7 @@ The sum of the block.
|
|
|
46
46
|
|
|
47
47
|
***
|
|
48
48
|
|
|
49
|
-
### update()
|
|
49
|
+
### update() {#update}
|
|
50
50
|
|
|
51
51
|
> **update**(`block`): `Sha1`
|
|
52
52
|
|
|
@@ -68,7 +68,7 @@ The instance for chaining.
|
|
|
68
68
|
|
|
69
69
|
***
|
|
70
70
|
|
|
71
|
-
### digest()
|
|
71
|
+
### digest() {#digest}
|
|
72
72
|
|
|
73
73
|
> **digest**(): `Uint8Array`
|
|
74
74
|
|
|
@@ -6,13 +6,13 @@ Perform a SHA-256 hash on the block.
|
|
|
6
6
|
|
|
7
7
|
### Constructor
|
|
8
8
|
|
|
9
|
-
> **new Sha256**(`bits
|
|
9
|
+
> **new Sha256**(`bits?`): `Sha256`
|
|
10
10
|
|
|
11
11
|
Create a new instance of Sha256.
|
|
12
12
|
|
|
13
13
|
#### Parameters
|
|
14
14
|
|
|
15
|
-
##### bits
|
|
15
|
+
##### bits?
|
|
16
16
|
|
|
17
17
|
`number` = `Sha256.SIZE_256`
|
|
18
18
|
|
|
@@ -24,7 +24,7 @@ The number of bits.
|
|
|
24
24
|
|
|
25
25
|
## Properties
|
|
26
26
|
|
|
27
|
-
### SIZE\_256
|
|
27
|
+
### SIZE\_256 {#size_256}
|
|
28
28
|
|
|
29
29
|
> `readonly` `static` **SIZE\_256**: `number` = `256`
|
|
30
30
|
|
|
@@ -32,7 +32,7 @@ Sha256 256.
|
|
|
32
32
|
|
|
33
33
|
***
|
|
34
34
|
|
|
35
|
-
### SIZE\_224
|
|
35
|
+
### SIZE\_224 {#size_224}
|
|
36
36
|
|
|
37
37
|
> `readonly` `static` **SIZE\_224**: `number` = `224`
|
|
38
38
|
|
|
@@ -40,7 +40,7 @@ Sha256 224.
|
|
|
40
40
|
|
|
41
41
|
***
|
|
42
42
|
|
|
43
|
-
### CLASS\_NAME
|
|
43
|
+
### CLASS\_NAME {#class_name}
|
|
44
44
|
|
|
45
45
|
> `readonly` `static` **CLASS\_NAME**: `string`
|
|
46
46
|
|
|
@@ -48,7 +48,7 @@ Runtime name for the class.
|
|
|
48
48
|
|
|
49
49
|
## Methods
|
|
50
50
|
|
|
51
|
-
### sum256()
|
|
51
|
+
### sum256() {#sum256}
|
|
52
52
|
|
|
53
53
|
> `static` **sum256**(`block`): `Uint8Array`
|
|
54
54
|
|
|
@@ -70,7 +70,7 @@ The sum 256 of the block.
|
|
|
70
70
|
|
|
71
71
|
***
|
|
72
72
|
|
|
73
|
-
### sum224()
|
|
73
|
+
### sum224() {#sum224}
|
|
74
74
|
|
|
75
75
|
> `static` **sum224**(`block`): `Uint8Array`
|
|
76
76
|
|
|
@@ -92,7 +92,7 @@ The sum 224 of the block.
|
|
|
92
92
|
|
|
93
93
|
***
|
|
94
94
|
|
|
95
|
-
### update()
|
|
95
|
+
### update() {#update}
|
|
96
96
|
|
|
97
97
|
> **update**(`block`): `Sha256`
|
|
98
98
|
|
|
@@ -114,7 +114,7 @@ The instance for chaining.
|
|
|
114
114
|
|
|
115
115
|
***
|
|
116
116
|
|
|
117
|
-
### digest()
|
|
117
|
+
### digest() {#digest}
|
|
118
118
|
|
|
119
119
|
> **digest**(): `Uint8Array`
|
|
120
120
|
|
|
@@ -6,13 +6,13 @@ Perform a SHA-3 hash on the block.
|
|
|
6
6
|
|
|
7
7
|
### Constructor
|
|
8
8
|
|
|
9
|
-
> **new Sha3**(`bits
|
|
9
|
+
> **new Sha3**(`bits?`): `Sha3`
|
|
10
10
|
|
|
11
11
|
Create a new instance of Sha3.
|
|
12
12
|
|
|
13
13
|
#### Parameters
|
|
14
14
|
|
|
15
|
-
##### bits
|
|
15
|
+
##### bits?
|
|
16
16
|
|
|
17
17
|
`number` = `Sha3.SIZE_256`
|
|
18
18
|
|
|
@@ -24,7 +24,7 @@ The number of bits.
|
|
|
24
24
|
|
|
25
25
|
## Properties
|
|
26
26
|
|
|
27
|
-
### SIZE\_224
|
|
27
|
+
### SIZE\_224 {#size_224}
|
|
28
28
|
|
|
29
29
|
> `readonly` `static` **SIZE\_224**: `number` = `224`
|
|
30
30
|
|
|
@@ -32,7 +32,7 @@ Sha3 224.
|
|
|
32
32
|
|
|
33
33
|
***
|
|
34
34
|
|
|
35
|
-
### SIZE\_256
|
|
35
|
+
### SIZE\_256 {#size_256}
|
|
36
36
|
|
|
37
37
|
> `readonly` `static` **SIZE\_256**: `number` = `256`
|
|
38
38
|
|
|
@@ -40,7 +40,7 @@ Sha3 256.
|
|
|
40
40
|
|
|
41
41
|
***
|
|
42
42
|
|
|
43
|
-
### SIZE\_384
|
|
43
|
+
### SIZE\_384 {#size_384}
|
|
44
44
|
|
|
45
45
|
> `readonly` `static` **SIZE\_384**: `number` = `384`
|
|
46
46
|
|
|
@@ -48,7 +48,7 @@ Sha3 384.
|
|
|
48
48
|
|
|
49
49
|
***
|
|
50
50
|
|
|
51
|
-
### SIZE\_512
|
|
51
|
+
### SIZE\_512 {#size_512}
|
|
52
52
|
|
|
53
53
|
> `readonly` `static` **SIZE\_512**: `number` = `512`
|
|
54
54
|
|
|
@@ -56,7 +56,7 @@ Sha3 512.
|
|
|
56
56
|
|
|
57
57
|
***
|
|
58
58
|
|
|
59
|
-
### CLASS\_NAME
|
|
59
|
+
### CLASS\_NAME {#class_name}
|
|
60
60
|
|
|
61
61
|
> `readonly` `static` **CLASS\_NAME**: `string`
|
|
62
62
|
|
|
@@ -64,7 +64,7 @@ Runtime name for the class.
|
|
|
64
64
|
|
|
65
65
|
## Methods
|
|
66
66
|
|
|
67
|
-
### sum256()
|
|
67
|
+
### sum256() {#sum256}
|
|
68
68
|
|
|
69
69
|
> `static` **sum256**(`block`): `Uint8Array`
|
|
70
70
|
|
|
@@ -86,7 +86,7 @@ The sum 256 of the block.
|
|
|
86
86
|
|
|
87
87
|
***
|
|
88
88
|
|
|
89
|
-
### sum224()
|
|
89
|
+
### sum224() {#sum224}
|
|
90
90
|
|
|
91
91
|
> `static` **sum224**(`block`): `Uint8Array`
|
|
92
92
|
|
|
@@ -108,7 +108,7 @@ The sum 224 of the block.
|
|
|
108
108
|
|
|
109
109
|
***
|
|
110
110
|
|
|
111
|
-
### sum384()
|
|
111
|
+
### sum384() {#sum384}
|
|
112
112
|
|
|
113
113
|
> `static` **sum384**(`block`): `Uint8Array`
|
|
114
114
|
|
|
@@ -130,7 +130,7 @@ The sum 384 of the block.
|
|
|
130
130
|
|
|
131
131
|
***
|
|
132
132
|
|
|
133
|
-
### sum512()
|
|
133
|
+
### sum512() {#sum512}
|
|
134
134
|
|
|
135
135
|
> `static` **sum512**(`block`): `Uint8Array`
|
|
136
136
|
|
|
@@ -152,7 +152,7 @@ The sum 512 of the block.
|
|
|
152
152
|
|
|
153
153
|
***
|
|
154
154
|
|
|
155
|
-
### update()
|
|
155
|
+
### update() {#update}
|
|
156
156
|
|
|
157
157
|
> **update**(`block`): `Sha3`
|
|
158
158
|
|
|
@@ -174,7 +174,7 @@ The instance for chaining.
|
|
|
174
174
|
|
|
175
175
|
***
|
|
176
176
|
|
|
177
|
-
### digest()
|
|
177
|
+
### digest() {#digest}
|
|
178
178
|
|
|
179
179
|
> **digest**(): `Uint8Array`
|
|
180
180
|
|