boho 2.0.0 → 2.1.1
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 -2
- package/dist/boho.js +2 -2
- package/dist/boho.js.map +1 -1
- package/dist/boho.min.js +3 -3
- package/dist/boho.min.js.map +1 -1
- package/package.json +5 -4
- package/src/boho.js +4 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "boho",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.1",
|
|
4
4
|
"description": "Secure Lightweight Encryption & Authentication Library for Node.js, Browsers and Arduino.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -19,10 +19,11 @@
|
|
|
19
19
|
"보호",
|
|
20
20
|
"암호"
|
|
21
21
|
],
|
|
22
|
-
"homepage": "https://github.com/remocons/boho#readme",
|
|
22
|
+
"homepage": "https://github.com/remocons/iosignal/tree/main/packages/boho#readme",
|
|
23
23
|
"repository": {
|
|
24
24
|
"type": "git",
|
|
25
|
-
"url": "
|
|
25
|
+
"url": "https://github.com/remocons/iosignal.git",
|
|
26
|
+
"directory": "packages/boho"
|
|
26
27
|
},
|
|
27
28
|
"author": {
|
|
28
29
|
"name": "Taeo Lee",
|
|
@@ -36,7 +37,7 @@
|
|
|
36
37
|
"rollup": "^4.36.0"
|
|
37
38
|
},
|
|
38
39
|
"dependencies": {
|
|
39
|
-
"meta-buffer-pack": "^2.1.
|
|
40
|
+
"meta-buffer-pack": "^2.1.1"
|
|
40
41
|
},
|
|
41
42
|
"scripts": {
|
|
42
43
|
"build": "rollup -c",
|
package/src/boho.js
CHANGED
|
@@ -135,10 +135,11 @@ export class Boho {
|
|
|
135
135
|
const now = Date.now()
|
|
136
136
|
const secTime = parseInt(now / 1000)
|
|
137
137
|
const milTime = now % 1000
|
|
138
|
+
if (++this.counter > 65535) this.counter = 0;
|
|
138
139
|
const salt12 = Buffer.concat([
|
|
139
140
|
MBP.NB('32L', secTime),
|
|
140
141
|
MBP.NB('16L', milTime),
|
|
141
|
-
MBP.NB('16L',
|
|
142
|
+
MBP.NB('16L', this.counter),
|
|
142
143
|
RAND(4) // JS: use crypto.getRandomValues(), Arduino: use micros()
|
|
143
144
|
])
|
|
144
145
|
salt12.copy(this._otpSrc44, 32)
|
|
@@ -152,10 +153,11 @@ export class Boho {
|
|
|
152
153
|
const now = Date.now()
|
|
153
154
|
const secTime = parseInt(now / 1000)
|
|
154
155
|
const milTime = now % 1000
|
|
156
|
+
if (++this.counter > 65535) this.counter = 0;
|
|
155
157
|
const salt12 = Buffer.concat([
|
|
156
158
|
MBP.NB('32L', secTime),
|
|
157
159
|
MBP.NB('16L', milTime),
|
|
158
|
-
MBP.NB('16L',
|
|
160
|
+
MBP.NB('16L', this.counter),
|
|
159
161
|
nonce
|
|
160
162
|
])
|
|
161
163
|
salt12.copy(this._otpSrc44, 32)
|