@twin.org/crypto 0.0.1-next.51 → 0.0.1-next.53
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/docs/changelog.md +28 -0
- package/docs/reference/classes/Bech32.md +3 -3
- package/docs/reference/classes/Bip32Path.md +6 -6
- package/docs/reference/classes/Bip39.md +4 -4
- package/docs/reference/classes/Bip44.md +3 -3
- package/docs/reference/classes/Blake2b.md +8 -8
- package/docs/reference/classes/Blake3.md +7 -7
- package/docs/reference/classes/ChaCha20Poly1305.md +3 -3
- package/docs/reference/classes/Ed25519.md +3 -3
- package/docs/reference/classes/HmacSha1.md +5 -5
- package/docs/reference/classes/HmacSha256.md +5 -5
- package/docs/reference/classes/HmacSha512.md +5 -5
- package/docs/reference/classes/Hotp.md +3 -3
- package/docs/reference/classes/PasswordGenerator.md +3 -3
- package/docs/reference/classes/PasswordValidator.md +4 -4
- package/docs/reference/classes/Pbkdf2.md +3 -3
- package/docs/reference/classes/Secp256k1.md +3 -3
- package/docs/reference/classes/Sha1.md +5 -5
- package/docs/reference/classes/Sha256.md +5 -5
- package/docs/reference/classes/Sha3.md +5 -5
- package/docs/reference/classes/Sha512.md +5 -5
- package/docs/reference/classes/Slip0010.md +3 -3
- package/docs/reference/classes/Totp.md +3 -3
- package/docs/reference/classes/X25519.md +3 -3
- package/docs/reference/classes/Zip215.md +3 -3
- package/docs/reference/type-aliases/KeyType.md +1 -1
- package/package.json +4 -4
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
# @twin.org/crypto - Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.1-next.53](https://github.com/twinfoundation/framework/compare/crypto-v0.0.1-next.52...crypto-v0.0.1-next.53) (2025-05-01)
|
|
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.1-next.52 to 0.0.1-next.53
|
|
16
|
+
|
|
17
|
+
## [0.0.1-next.52](https://github.com/twinfoundation/framework/compare/crypto-v0.0.1-next.51...crypto-v0.0.1-next.52) (2025-04-17)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
* use new shared store mechanism ([#131](https://github.com/twinfoundation/framework/issues/131)) ([934385b](https://github.com/twinfoundation/framework/commit/934385b2fbaf9f5c00a505ebf9d093bd5a425f55))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Dependencies
|
|
26
|
+
|
|
27
|
+
* The following workspace dependencies were updated
|
|
28
|
+
* dependencies
|
|
29
|
+
* @twin.org/core bumped from 0.0.1-next.51 to 0.0.1-next.52
|
|
30
|
+
|
|
3
31
|
## [0.0.1-next.51](https://github.com/twinfoundation/framework/compare/crypto-v0.0.1-next.50...crypto-v0.0.1-next.51) (2025-03-27)
|
|
4
32
|
|
|
5
33
|
|
|
@@ -4,13 +4,13 @@ Bech32 encoding and decoding.
|
|
|
4
4
|
|
|
5
5
|
## Constructors
|
|
6
6
|
|
|
7
|
-
###
|
|
7
|
+
### Constructor
|
|
8
8
|
|
|
9
|
-
> **new Bech32**():
|
|
9
|
+
> **new Bech32**(): `Bech32`
|
|
10
10
|
|
|
11
11
|
#### Returns
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
`Bech32`
|
|
14
14
|
|
|
15
15
|
## Methods
|
|
16
16
|
|
|
@@ -4,9 +4,9 @@ Class to help with bip32 paths.
|
|
|
4
4
|
|
|
5
5
|
## Constructors
|
|
6
6
|
|
|
7
|
-
###
|
|
7
|
+
### Constructor
|
|
8
8
|
|
|
9
|
-
> **new Bip32Path**(`initialPath
|
|
9
|
+
> **new Bip32Path**(`initialPath?`): `Bip32Path`
|
|
10
10
|
|
|
11
11
|
Create a new instance of Bip32Path.
|
|
12
12
|
|
|
@@ -20,13 +20,13 @@ Initial path to create.
|
|
|
20
20
|
|
|
21
21
|
#### Returns
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
`Bip32Path`
|
|
24
24
|
|
|
25
25
|
## Methods
|
|
26
26
|
|
|
27
27
|
### fromPath()
|
|
28
28
|
|
|
29
|
-
> `static` **fromPath**(`bip32Path`):
|
|
29
|
+
> `static` **fromPath**(`bip32Path`): `Bip32Path`
|
|
30
30
|
|
|
31
31
|
Construct a new path by cloning an existing one.
|
|
32
32
|
|
|
@@ -34,13 +34,13 @@ Construct a new path by cloning an existing one.
|
|
|
34
34
|
|
|
35
35
|
##### bip32Path
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
`Bip32Path`
|
|
38
38
|
|
|
39
39
|
The path to clone.
|
|
40
40
|
|
|
41
41
|
#### Returns
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
`Bip32Path`
|
|
44
44
|
|
|
45
45
|
A new instance of Bip32Path.
|
|
46
46
|
|
|
@@ -4,13 +4,13 @@ Implementation of Bip39 for mnemonic generation.
|
|
|
4
4
|
|
|
5
5
|
## Constructors
|
|
6
6
|
|
|
7
|
-
###
|
|
7
|
+
### Constructor
|
|
8
8
|
|
|
9
|
-
> **new Bip39**():
|
|
9
|
+
> **new Bip39**(): `Bip39`
|
|
10
10
|
|
|
11
11
|
#### Returns
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
`Bip39`
|
|
14
14
|
|
|
15
15
|
## Methods
|
|
16
16
|
|
|
@@ -80,7 +80,7 @@ Error if the length of the entropy is not a multiple of 4, or is less than 16 or
|
|
|
80
80
|
|
|
81
81
|
### mnemonicToSeed()
|
|
82
82
|
|
|
83
|
-
> `static` **mnemonicToSeed**(`mnemonic`, `password
|
|
83
|
+
> `static` **mnemonicToSeed**(`mnemonic`, `password?`): `Uint8Array`
|
|
84
84
|
|
|
85
85
|
Convert a mnemonic to a seed.
|
|
86
86
|
|
|
@@ -4,13 +4,13 @@ Implementation of Bip44 for address generation.
|
|
|
4
4
|
|
|
5
5
|
## Constructors
|
|
6
6
|
|
|
7
|
-
###
|
|
7
|
+
### Constructor
|
|
8
8
|
|
|
9
|
-
> **new Bip44**():
|
|
9
|
+
> **new Bip44**(): `Bip44`
|
|
10
10
|
|
|
11
11
|
#### Returns
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
`Bip44`
|
|
14
14
|
|
|
15
15
|
## Methods
|
|
16
16
|
|
|
@@ -4,9 +4,9 @@ Class to help with Blake2B Signature scheme.
|
|
|
4
4
|
|
|
5
5
|
## Constructors
|
|
6
6
|
|
|
7
|
-
###
|
|
7
|
+
### Constructor
|
|
8
8
|
|
|
9
|
-
> **new Blake2b**(`outputLength`, `key
|
|
9
|
+
> **new Blake2b**(`outputLength`, `key?`): `Blake2b`
|
|
10
10
|
|
|
11
11
|
Create a new instance of Blake2b.
|
|
12
12
|
|
|
@@ -26,7 +26,7 @@ Optional key for the hash.
|
|
|
26
26
|
|
|
27
27
|
#### Returns
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
`Blake2b`
|
|
30
30
|
|
|
31
31
|
## Properties
|
|
32
32
|
|
|
@@ -56,7 +56,7 @@ Blake2b 512.
|
|
|
56
56
|
|
|
57
57
|
### sum160()
|
|
58
58
|
|
|
59
|
-
> `static` **sum160**(`block`, `key
|
|
59
|
+
> `static` **sum160**(`block`, `key?`): `Uint8Array`
|
|
60
60
|
|
|
61
61
|
Perform Sum 160 on the block.
|
|
62
62
|
|
|
@@ -84,7 +84,7 @@ The sum 160 of the block.
|
|
|
84
84
|
|
|
85
85
|
### sum256()
|
|
86
86
|
|
|
87
|
-
> `static` **sum256**(`block`, `key
|
|
87
|
+
> `static` **sum256**(`block`, `key?`): `Uint8Array`
|
|
88
88
|
|
|
89
89
|
Perform Sum 256 on the block.
|
|
90
90
|
|
|
@@ -112,7 +112,7 @@ The sum 256 of the block.
|
|
|
112
112
|
|
|
113
113
|
### sum512()
|
|
114
114
|
|
|
115
|
-
> `static` **sum512**(`block`, `key
|
|
115
|
+
> `static` **sum512**(`block`, `key?`): `Uint8Array`
|
|
116
116
|
|
|
117
117
|
Perform Sum 512 on the block.
|
|
118
118
|
|
|
@@ -140,7 +140,7 @@ The sum 512 of the block.
|
|
|
140
140
|
|
|
141
141
|
### update()
|
|
142
142
|
|
|
143
|
-
> **update**(`block`):
|
|
143
|
+
> **update**(`block`): `Blake2b`
|
|
144
144
|
|
|
145
145
|
Update the hash with the block.
|
|
146
146
|
|
|
@@ -154,7 +154,7 @@ The block to update the hash with.
|
|
|
154
154
|
|
|
155
155
|
#### Returns
|
|
156
156
|
|
|
157
|
-
|
|
157
|
+
`Blake2b`
|
|
158
158
|
|
|
159
159
|
The instance for chaining.
|
|
160
160
|
|
|
@@ -4,9 +4,9 @@ Class to help with Blake3 Signature scheme.
|
|
|
4
4
|
|
|
5
5
|
## Constructors
|
|
6
6
|
|
|
7
|
-
###
|
|
7
|
+
### Constructor
|
|
8
8
|
|
|
9
|
-
> **new Blake3**(`outputLength`, `key
|
|
9
|
+
> **new Blake3**(`outputLength`, `key?`): `Blake3`
|
|
10
10
|
|
|
11
11
|
Create a new instance of Blake3.
|
|
12
12
|
|
|
@@ -26,7 +26,7 @@ Optional key for the hash.
|
|
|
26
26
|
|
|
27
27
|
#### Returns
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
`Blake3`
|
|
30
30
|
|
|
31
31
|
## Properties
|
|
32
32
|
|
|
@@ -48,7 +48,7 @@ Blake3 512.
|
|
|
48
48
|
|
|
49
49
|
### sum256()
|
|
50
50
|
|
|
51
|
-
> `static` **sum256**(`block`, `key
|
|
51
|
+
> `static` **sum256**(`block`, `key?`): `Uint8Array`
|
|
52
52
|
|
|
53
53
|
Perform Sum 256 on the block.
|
|
54
54
|
|
|
@@ -76,7 +76,7 @@ The sum 256 of the block.
|
|
|
76
76
|
|
|
77
77
|
### sum512()
|
|
78
78
|
|
|
79
|
-
> `static` **sum512**(`block`, `key
|
|
79
|
+
> `static` **sum512**(`block`, `key?`): `Uint8Array`
|
|
80
80
|
|
|
81
81
|
Perform Sum 512 on the block.
|
|
82
82
|
|
|
@@ -104,7 +104,7 @@ The sum 512 of the block.
|
|
|
104
104
|
|
|
105
105
|
### update()
|
|
106
106
|
|
|
107
|
-
> **update**(`block`):
|
|
107
|
+
> **update**(`block`): `Blake3`
|
|
108
108
|
|
|
109
109
|
Update the hash with the block.
|
|
110
110
|
|
|
@@ -118,7 +118,7 @@ The block to update the hash with.
|
|
|
118
118
|
|
|
119
119
|
#### Returns
|
|
120
120
|
|
|
121
|
-
|
|
121
|
+
`Blake3`
|
|
122
122
|
|
|
123
123
|
The instance for chaining.
|
|
124
124
|
|
|
@@ -4,9 +4,9 @@ Implementation of the ChaCha20Poly1305 cipher.
|
|
|
4
4
|
|
|
5
5
|
## Constructors
|
|
6
6
|
|
|
7
|
-
###
|
|
7
|
+
### Constructor
|
|
8
8
|
|
|
9
|
-
> **new ChaCha20Poly1305**(`key`, `nonce`, `aad
|
|
9
|
+
> **new ChaCha20Poly1305**(`key`, `nonce`, `aad?`): `ChaCha20Poly1305`
|
|
10
10
|
|
|
11
11
|
Create a new instance of ChaCha20Poly1305.
|
|
12
12
|
|
|
@@ -32,7 +32,7 @@ The additional authenticated data.
|
|
|
32
32
|
|
|
33
33
|
#### Returns
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
`ChaCha20Poly1305`
|
|
36
36
|
|
|
37
37
|
## Methods
|
|
38
38
|
|
|
@@ -4,13 +4,13 @@ Implementation of Ed25519.
|
|
|
4
4
|
|
|
5
5
|
## Constructors
|
|
6
6
|
|
|
7
|
-
###
|
|
7
|
+
### Constructor
|
|
8
8
|
|
|
9
|
-
> **new Ed25519**():
|
|
9
|
+
> **new Ed25519**(): `Ed25519`
|
|
10
10
|
|
|
11
11
|
#### Returns
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
`Ed25519`
|
|
14
14
|
|
|
15
15
|
## Properties
|
|
16
16
|
|
|
@@ -4,9 +4,9 @@ Class to help with HmacSha1 scheme.
|
|
|
4
4
|
|
|
5
5
|
## Constructors
|
|
6
6
|
|
|
7
|
-
###
|
|
7
|
+
### Constructor
|
|
8
8
|
|
|
9
|
-
> **new HmacSha1**(`key`):
|
|
9
|
+
> **new HmacSha1**(`key`): `HmacSha1`
|
|
10
10
|
|
|
11
11
|
Create a new instance of HmacSha1.
|
|
12
12
|
|
|
@@ -20,7 +20,7 @@ The key for the hmac.
|
|
|
20
20
|
|
|
21
21
|
#### Returns
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
`HmacSha1`
|
|
24
24
|
|
|
25
25
|
## Methods
|
|
26
26
|
|
|
@@ -54,7 +54,7 @@ The sum of the block.
|
|
|
54
54
|
|
|
55
55
|
### update()
|
|
56
56
|
|
|
57
|
-
> **update**(`block`):
|
|
57
|
+
> **update**(`block`): `HmacSha1`
|
|
58
58
|
|
|
59
59
|
Update the hash with the block.
|
|
60
60
|
|
|
@@ -68,7 +68,7 @@ The block to update the hash with.
|
|
|
68
68
|
|
|
69
69
|
#### Returns
|
|
70
70
|
|
|
71
|
-
|
|
71
|
+
`HmacSha1`
|
|
72
72
|
|
|
73
73
|
The instance for chaining.
|
|
74
74
|
|
|
@@ -4,9 +4,9 @@ Class to help with HmacSha256 scheme.
|
|
|
4
4
|
|
|
5
5
|
## Constructors
|
|
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
|
|
|
@@ -26,7 +26,7 @@ The number of bits.
|
|
|
26
26
|
|
|
27
27
|
#### Returns
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
`HmacSha256`
|
|
30
30
|
|
|
31
31
|
## Properties
|
|
32
32
|
|
|
@@ -104,7 +104,7 @@ The sum 256 of the block.
|
|
|
104
104
|
|
|
105
105
|
### update()
|
|
106
106
|
|
|
107
|
-
> **update**(`block`):
|
|
107
|
+
> **update**(`block`): `HmacSha256`
|
|
108
108
|
|
|
109
109
|
Update the hash with the block.
|
|
110
110
|
|
|
@@ -118,7 +118,7 @@ The block to update the hash with.
|
|
|
118
118
|
|
|
119
119
|
#### Returns
|
|
120
120
|
|
|
121
|
-
|
|
121
|
+
`HmacSha256`
|
|
122
122
|
|
|
123
123
|
The instance for chaining.
|
|
124
124
|
|
|
@@ -4,9 +4,9 @@ Class to help with HmacSha512 scheme.
|
|
|
4
4
|
|
|
5
5
|
## Constructors
|
|
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
|
|
|
@@ -26,7 +26,7 @@ The number of bits.
|
|
|
26
26
|
|
|
27
27
|
#### Returns
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
`HmacSha512`
|
|
30
30
|
|
|
31
31
|
## Properties
|
|
32
32
|
|
|
@@ -176,7 +176,7 @@ The sum 224 of the block.
|
|
|
176
176
|
|
|
177
177
|
### update()
|
|
178
178
|
|
|
179
|
-
> **update**(`block`):
|
|
179
|
+
> **update**(`block`): `HmacSha512`
|
|
180
180
|
|
|
181
181
|
Update the hash with the block.
|
|
182
182
|
|
|
@@ -190,7 +190,7 @@ The block to update the hash with.
|
|
|
190
190
|
|
|
191
191
|
#### Returns
|
|
192
192
|
|
|
193
|
-
|
|
193
|
+
`HmacSha512`
|
|
194
194
|
|
|
195
195
|
The instance for chaining.
|
|
196
196
|
|
|
@@ -5,13 +5,13 @@ Implementation of https://datatracker.ietf.org/doc/html/rfc4226 .
|
|
|
5
5
|
|
|
6
6
|
## Constructors
|
|
7
7
|
|
|
8
|
-
###
|
|
8
|
+
### Constructor
|
|
9
9
|
|
|
10
|
-
> **new Hotp**():
|
|
10
|
+
> **new Hotp**(): `Hotp`
|
|
11
11
|
|
|
12
12
|
#### Returns
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
`Hotp`
|
|
15
15
|
|
|
16
16
|
## Methods
|
|
17
17
|
|
|
@@ -4,13 +4,13 @@ Generate random passwords.
|
|
|
4
4
|
|
|
5
5
|
## Constructors
|
|
6
6
|
|
|
7
|
-
###
|
|
7
|
+
### Constructor
|
|
8
8
|
|
|
9
|
-
> **new PasswordGenerator**():
|
|
9
|
+
> **new PasswordGenerator**(): `PasswordGenerator`
|
|
10
10
|
|
|
11
11
|
#### Returns
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
`PasswordGenerator`
|
|
14
14
|
|
|
15
15
|
## Methods
|
|
16
16
|
|
|
@@ -5,19 +5,19 @@ Ref https://www.owasp.org/index.php/Authentication_Cheat_Sheet#Implement_Proper_
|
|
|
5
5
|
|
|
6
6
|
## Constructors
|
|
7
7
|
|
|
8
|
-
###
|
|
8
|
+
### Constructor
|
|
9
9
|
|
|
10
|
-
> **new PasswordValidator**():
|
|
10
|
+
> **new PasswordValidator**(): `PasswordValidator`
|
|
11
11
|
|
|
12
12
|
#### Returns
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
`PasswordValidator`
|
|
15
15
|
|
|
16
16
|
## Methods
|
|
17
17
|
|
|
18
18
|
### validate()
|
|
19
19
|
|
|
20
|
-
> `static` **validate**(`property`, `password`, `failures`, `options
|
|
20
|
+
> `static` **validate**(`property`, `password`, `failures`, `options?`): `void`
|
|
21
21
|
|
|
22
22
|
Test the strength of the password.
|
|
23
23
|
|
|
@@ -4,13 +4,13 @@ Implementation of the password based key derivation function 2.
|
|
|
4
4
|
|
|
5
5
|
## Constructors
|
|
6
6
|
|
|
7
|
-
###
|
|
7
|
+
### Constructor
|
|
8
8
|
|
|
9
|
-
> **new Pbkdf2**():
|
|
9
|
+
> **new Pbkdf2**(): `Pbkdf2`
|
|
10
10
|
|
|
11
11
|
#### Returns
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
`Pbkdf2`
|
|
14
14
|
|
|
15
15
|
## Methods
|
|
16
16
|
|
|
@@ -4,13 +4,13 @@ Implementation of secp256k1.
|
|
|
4
4
|
|
|
5
5
|
## Constructors
|
|
6
6
|
|
|
7
|
-
###
|
|
7
|
+
### Constructor
|
|
8
8
|
|
|
9
|
-
> **new Secp256k1**():
|
|
9
|
+
> **new Secp256k1**(): `Secp256k1`
|
|
10
10
|
|
|
11
11
|
#### Returns
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
`Secp256k1`
|
|
14
14
|
|
|
15
15
|
## Properties
|
|
16
16
|
|
|
@@ -4,15 +4,15 @@ Perform a SHA-1 hash on the block.
|
|
|
4
4
|
|
|
5
5
|
## Constructors
|
|
6
6
|
|
|
7
|
-
###
|
|
7
|
+
### Constructor
|
|
8
8
|
|
|
9
|
-
> **new Sha1**():
|
|
9
|
+
> **new Sha1**(): `Sha1`
|
|
10
10
|
|
|
11
11
|
Create a new instance of Sha1.
|
|
12
12
|
|
|
13
13
|
#### Returns
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
`Sha1`
|
|
16
16
|
|
|
17
17
|
## Methods
|
|
18
18
|
|
|
@@ -40,7 +40,7 @@ The sum of the block.
|
|
|
40
40
|
|
|
41
41
|
### update()
|
|
42
42
|
|
|
43
|
-
> **update**(`block`):
|
|
43
|
+
> **update**(`block`): `Sha1`
|
|
44
44
|
|
|
45
45
|
Update the hash with the block.
|
|
46
46
|
|
|
@@ -54,7 +54,7 @@ The block to update the hash with.
|
|
|
54
54
|
|
|
55
55
|
#### Returns
|
|
56
56
|
|
|
57
|
-
|
|
57
|
+
`Sha1`
|
|
58
58
|
|
|
59
59
|
The instance for chaining.
|
|
60
60
|
|
|
@@ -4,9 +4,9 @@ Perform a SHA-256 hash on the block.
|
|
|
4
4
|
|
|
5
5
|
## Constructors
|
|
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
|
|
|
@@ -20,7 +20,7 @@ The number of bits.
|
|
|
20
20
|
|
|
21
21
|
#### Returns
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
`Sha256`
|
|
24
24
|
|
|
25
25
|
## Properties
|
|
26
26
|
|
|
@@ -86,7 +86,7 @@ The sum 224 of the block.
|
|
|
86
86
|
|
|
87
87
|
### update()
|
|
88
88
|
|
|
89
|
-
> **update**(`block`):
|
|
89
|
+
> **update**(`block`): `Sha256`
|
|
90
90
|
|
|
91
91
|
Update the hash with the block.
|
|
92
92
|
|
|
@@ -100,7 +100,7 @@ The block to update the hash with.
|
|
|
100
100
|
|
|
101
101
|
#### Returns
|
|
102
102
|
|
|
103
|
-
|
|
103
|
+
`Sha256`
|
|
104
104
|
|
|
105
105
|
The instance for chaining.
|
|
106
106
|
|
|
@@ -4,9 +4,9 @@ Perform a SHA-3 hash on the block.
|
|
|
4
4
|
|
|
5
5
|
## Constructors
|
|
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
|
|
|
@@ -20,7 +20,7 @@ The number of bits.
|
|
|
20
20
|
|
|
21
21
|
#### Returns
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
`Sha3`
|
|
24
24
|
|
|
25
25
|
## Properties
|
|
26
26
|
|
|
@@ -146,7 +146,7 @@ The sum 512 of the block.
|
|
|
146
146
|
|
|
147
147
|
### update()
|
|
148
148
|
|
|
149
|
-
> **update**(`block`):
|
|
149
|
+
> **update**(`block`): `Sha3`
|
|
150
150
|
|
|
151
151
|
Update the hash with the block.
|
|
152
152
|
|
|
@@ -160,7 +160,7 @@ The block to update the hash with.
|
|
|
160
160
|
|
|
161
161
|
#### Returns
|
|
162
162
|
|
|
163
|
-
|
|
163
|
+
`Sha3`
|
|
164
164
|
|
|
165
165
|
The instance for chaining.
|
|
166
166
|
|
|
@@ -4,9 +4,9 @@ Perform a SHA-512 hash on the block.
|
|
|
4
4
|
|
|
5
5
|
## Constructors
|
|
6
6
|
|
|
7
|
-
###
|
|
7
|
+
### Constructor
|
|
8
8
|
|
|
9
|
-
> **new Sha512**(`bits`):
|
|
9
|
+
> **new Sha512**(`bits`): `Sha512`
|
|
10
10
|
|
|
11
11
|
Create a new instance of Sha512.
|
|
12
12
|
|
|
@@ -20,7 +20,7 @@ The number of bits.
|
|
|
20
20
|
|
|
21
21
|
#### Returns
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
`Sha512`
|
|
24
24
|
|
|
25
25
|
## Properties
|
|
26
26
|
|
|
@@ -146,7 +146,7 @@ The sum 224 of the block.
|
|
|
146
146
|
|
|
147
147
|
### update()
|
|
148
148
|
|
|
149
|
-
> **update**(`block`):
|
|
149
|
+
> **update**(`block`): `Sha512`
|
|
150
150
|
|
|
151
151
|
Update the hash with the block.
|
|
152
152
|
|
|
@@ -160,7 +160,7 @@ The block to update the hash with.
|
|
|
160
160
|
|
|
161
161
|
#### Returns
|
|
162
162
|
|
|
163
|
-
|
|
163
|
+
`Sha512`
|
|
164
164
|
|
|
165
165
|
The instance for chaining.
|
|
166
166
|
|
|
@@ -5,13 +5,13 @@ https://github.com/satoshilabs/slips/blob/master/slip-0010.md.
|
|
|
5
5
|
|
|
6
6
|
## Constructors
|
|
7
7
|
|
|
8
|
-
###
|
|
8
|
+
### Constructor
|
|
9
9
|
|
|
10
|
-
> **new Slip0010**():
|
|
10
|
+
> **new Slip0010**(): `Slip0010`
|
|
11
11
|
|
|
12
12
|
#### Returns
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
`Slip0010`
|
|
15
15
|
|
|
16
16
|
## Methods
|
|
17
17
|
|
|
@@ -5,13 +5,13 @@ Implementation of https://datatracker.ietf.org/doc/html/rfc4226 .
|
|
|
5
5
|
|
|
6
6
|
## Constructors
|
|
7
7
|
|
|
8
|
-
###
|
|
8
|
+
### Constructor
|
|
9
9
|
|
|
10
|
-
> **new Totp**():
|
|
10
|
+
> **new Totp**(): `Totp`
|
|
11
11
|
|
|
12
12
|
#### Returns
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
`Totp`
|
|
15
15
|
|
|
16
16
|
## Methods
|
|
17
17
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Type Alias: KeyType
|
|
2
2
|
|
|
3
|
-
> **KeyType
|
|
3
|
+
> **KeyType** = *typeof* [`KeyType`](../variables/KeyType.md)\[keyof *typeof* [`KeyType`](../variables/KeyType.md)\]
|
|
4
4
|
|
|
5
5
|
Key types.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/crypto",
|
|
3
|
-
"version": "0.0.1-next.
|
|
3
|
+
"version": "0.0.1-next.53",
|
|
4
4
|
"description": "Contains helper methods and classes which implement cryptographic functions",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -15,12 +15,12 @@
|
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@noble/ciphers": "1.2.1",
|
|
18
|
-
"@noble/curves": "1.8.
|
|
19
|
-
"@noble/hashes": "1.7.
|
|
18
|
+
"@noble/curves": "1.8.2",
|
|
19
|
+
"@noble/hashes": "1.7.2",
|
|
20
20
|
"@scure/base": "1.2.4",
|
|
21
21
|
"@scure/bip32": "1.6.2",
|
|
22
22
|
"@scure/bip39": "1.5.4",
|
|
23
|
-
"@twin.org/core": "0.0.1-next.
|
|
23
|
+
"@twin.org/core": "0.0.1-next.53",
|
|
24
24
|
"@twin.org/nameof": "next",
|
|
25
25
|
"micro-key-producer": "0.7.5"
|
|
26
26
|
},
|