diff --git a/src/keychain.js b/src/keychain.js index da94ab2..87c6755 100644 --- a/src/keychain.js +++ b/src/keychain.js @@ -25,7 +25,8 @@ const defaultOptions = { iterationCount: 10000, salt: 'you should override this value with a crypto secure random number', hash: 'sha2-512' - } + }, + passPhrase: 'correcthorsebatterystaple' } function validateKeyName (name) { diff --git a/test/keychain.spec.js b/test/keychain.spec.js index ae78cb1..c10450c 100644 --- a/test/keychain.spec.js +++ b/test/keychain.spec.js @@ -25,8 +25,8 @@ module.exports = (datastore1, datastore2) => { done() }) - it('needs a pass phrase to encrypt a key', () => { - expect(() => new Keychain(datastore2)).to.throw() + it('does not need a pass phrase to encrypt a key', () => { + expect(() => new Keychain(datastore2)).to.not.throw() }) it('needs a NIST SP 800-132 non-weak pass phrase', () => {