mirror of
https://github.com/fluencelabs/js-libp2p-crypto
synced 2025-06-27 18:51:52 +00:00
fix: replace node buffers with uint8arrays (#180)
* fix: replace node buffers with uint8arrays All usage of node buffers have been replaced with uint8arrays. BREAKING CHANGES: - Where node Buffers were returned, now Uint8Arrays are * chore: remove commented code
This commit is contained in:
@ -9,6 +9,7 @@ chai.use(dirtyChai)
|
||||
const crypto = require('../src')
|
||||
const fixtures = require('./fixtures/go-key-rsa')
|
||||
const { expectErrCode } = require('./util')
|
||||
const uint8ArrayEquals = require('uint8arrays/equals')
|
||||
|
||||
/** @typedef {import("libp2p-crypto").PrivateKey} PrivateKey */
|
||||
|
||||
@ -83,7 +84,7 @@ describe('libp2p-crypto', function () {
|
||||
it('unmarshal -> marshal, public key', () => {
|
||||
const key = crypto.keys.unmarshalPublicKey(fixtures.public.key)
|
||||
const marshalled = crypto.keys.marshalPublicKey(key)
|
||||
expect(fixtures.public.key.equals(marshalled)).to.eql(true)
|
||||
expect(uint8ArrayEquals(fixtures.public.key, marshalled)).to.eql(true)
|
||||
})
|
||||
})
|
||||
|
||||
|
Reference in New Issue
Block a user