@lockerpm/desktop-service 2.1.0 → 2.1.2
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.
|
@@ -19,7 +19,7 @@ exports.CoreCryptoService = void 0;
|
|
|
19
19
|
const crypto_1 = __importDefault(require("crypto"));
|
|
20
20
|
const crypto_service_1 = require("../abstractions/crypto.service");
|
|
21
21
|
const utils_1 = require("../misc/utils");
|
|
22
|
-
const
|
|
22
|
+
const argon2_1 = require("@noble/hashes/argon2");
|
|
23
23
|
const crypto = crypto_1.default.webcrypto;
|
|
24
24
|
class CoreCryptoService {
|
|
25
25
|
makeKey(password, salt, kdf, kdfIterations, kdfMemory, kdfParallelism) {
|
|
@@ -88,7 +88,7 @@ class CoreCryptoService {
|
|
|
88
88
|
return __awaiter(this, void 0, void 0, function* () {
|
|
89
89
|
const nodePassword = new Uint8Array(this.toBuf(password));
|
|
90
90
|
const nodeSalt = new Uint8Array(this.toBuf(salt));
|
|
91
|
-
const res = yield (0,
|
|
91
|
+
const res = yield (0, argon2_1.argon2idAsync)(nodePassword, nodeSalt, {
|
|
92
92
|
t: iterations,
|
|
93
93
|
m: memory,
|
|
94
94
|
p: parallelism,
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import c from 'crypto';
|
|
5
5
|
import { KdfType, SymmetricCryptoKey, EncString, EncryptedObject, } from '../abstractions/crypto.service';
|
|
6
6
|
import { Utils } from '../misc/utils';
|
|
7
|
-
import { argon2idAsync } from '@noble/hashes/argon2
|
|
7
|
+
import { argon2idAsync } from '@noble/hashes/argon2';
|
|
8
8
|
const crypto = c.webcrypto;
|
|
9
9
|
export class CoreCryptoService {
|
|
10
10
|
async makeKey(password, salt, kdf, kdfIterations, kdfMemory, kdfParallelism) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lockerpm/desktop-service",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@grpc/grpc-js": "^1.14.3",
|
|
50
|
-
"@noble/hashes": "^
|
|
50
|
+
"@noble/hashes": "^1.8.0",
|
|
51
51
|
"axios": "^1.13.5",
|
|
52
52
|
"eventemitter3": "^5.0.1",
|
|
53
53
|
"find-process": "^1.4.7",
|