@1auth/crypto 0.0.0-alpha.36 → 0.0.0-alpha.38
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/index.js +2 -2
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -256,7 +256,7 @@ export const symetricEncrypt = (
|
|
|
256
256
|
sub
|
|
257
257
|
})
|
|
258
258
|
}
|
|
259
|
-
if (!encryptionKey) return data
|
|
259
|
+
if (!encryptionKey || !data) return data
|
|
260
260
|
decoding ??= 'utf8'
|
|
261
261
|
encoding ??= options.symetricEncryptionEncoding
|
|
262
262
|
iv ??= randomBytes(12) // 96 bits
|
|
@@ -319,7 +319,7 @@ export const symetricDecrypt = (
|
|
|
319
319
|
sub
|
|
320
320
|
})
|
|
321
321
|
}
|
|
322
|
-
if (!encryptionKey) return encryptedDataPacket
|
|
322
|
+
if (!encryptionKey || !encryptedDataPacket) return encryptedDataPacket
|
|
323
323
|
decoding ??= options.symetricEncryptionEncoding
|
|
324
324
|
encoding ??= 'utf8'
|
|
325
325
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@1auth/crypto",
|
|
3
|
-
"version": "0.0.0-alpha.
|
|
3
|
+
"version": "0.0.0-alpha.38",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -46,6 +46,6 @@
|
|
|
46
46
|
"homepage": "https://github.com/willfarrell/1auth",
|
|
47
47
|
"gitHead": "7a6c0fbb8ab71d6a2171e678697de9f237568431",
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@node-rs/argon2": "
|
|
49
|
+
"@node-rs/argon2": "2.0.0"
|
|
50
50
|
}
|
|
51
51
|
}
|