mirror of
https://github.com/fluencelabs/js-libp2p-crypto
synced 2025-06-22 08:51:34 +00:00
fix(ecdh): allow base64 to be left-0-padded, needed for JWK format
Fixes #97
This commit is contained in:
committed by
Friedel Ziegelmayer
parent
2b0b7abd78
commit
be64372a5e
@ -22,4 +22,10 @@ describe('Util', () => {
|
||||
expect(util.toBase64(bn)).to.be.eql('3q0')
|
||||
done()
|
||||
})
|
||||
|
||||
it('toBase64 zero padding', (done) => {
|
||||
let bnpad = new BN('ff', 16)
|
||||
expect(util.toBase64(bnpad, 2)).to.be.eql('AP8')
|
||||
done()
|
||||
})
|
||||
})
|
||||
|
Reference in New Issue
Block a user