mirror of
https://github.com/fluencelabs/js-libp2p-crypto
synced 2025-06-30 01:31:55 +00:00
fix: put optional args last for key export (#154)
BREAKING CHANGE: key export arguments are now swapped so that the optional format is last
This commit is contained in:
@ -88,7 +88,7 @@ describe('RSA', function () {
|
||||
|
||||
describe('export and import', () => {
|
||||
it('password protected PKCS #8', async () => {
|
||||
const pem = await key.export('pkcs-8', 'my secret')
|
||||
const pem = await key.export('my secret', 'pkcs-8')
|
||||
expect(pem).to.startsWith('-----BEGIN ENCRYPTED PRIVATE KEY-----')
|
||||
const clone = await crypto.keys.import(pem, 'my secret')
|
||||
expect(clone).to.exist()
|
||||
|
Reference in New Issue
Block a user