@emartech/easy-crypto
Advanced tools
Comparing version 4.0.0 to 4.0.1
'use strict'; | ||
const NodeCache = require('node-cache'); | ||
const config = require('./config'); | ||
@@ -43,3 +44,3 @@ class CachedKeyring { | ||
const cacheKey = salt + this._keyring.password; | ||
const cacheKey = salt.toString(config.CIPHERTEXT_ENCODING) + this._keyring.password; | ||
const keyData = this._cache.get(cacheKey); | ||
@@ -46,0 +47,0 @@ |
@@ -128,3 +128,3 @@ 'use strict'; | ||
expect(setSpy.calledWith(salt + 'password', {value: key, lastAccessed: 12345678})).to.be.ok; | ||
expect(setSpy.calledWith(salt.toString('base64') + 'password', {value: key, lastAccessed: 12345678})).to.be.ok; | ||
}); | ||
@@ -155,4 +155,4 @@ | ||
expect(setSpy.firstCall.calledWith(salt + 'password', {value: key, lastAccessed: 1})).to.be.ok; | ||
expect(setSpy.secondCall.calledWith(salt + 'password', {value: key, lastAccessed: 3})).to.be.ok; | ||
expect(setSpy.firstCall.calledWith(salt.toString('base64') + 'password', {value: key, lastAccessed: 1})).to.be.ok; | ||
expect(setSpy.secondCall.calledWith(salt.toString('base64') + 'password', {value: key, lastAccessed: 3})).to.be.ok; | ||
}); | ||
@@ -173,3 +173,3 @@ | ||
expect(delSpy.calledWith(salt + 'password')).to.be.ok; | ||
expect(delSpy.calledWith(salt.toString('base64') + 'password')).to.be.ok; | ||
}); | ||
@@ -176,0 +176,0 @@ |
@@ -7,2 +7,3 @@ { | ||
"test": "mocha --require co-mocha *.spec.js **/*.spec.js", | ||
"test:watch": "npm run test -- --watch --reporter dot", | ||
"validate-commit-msg": "validate-commit-msg", | ||
@@ -39,3 +40,3 @@ "semantic-release": "semantic-release" | ||
}, | ||
"version": "4.0.0" | ||
"version": "4.0.1" | ||
} |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
33242
18
659
0