mirror of
https://github.com/fluencelabs/js-peer-id
synced 2025-04-25 12:02:31 +00:00
cleanup changes
This commit is contained in:
parent
67c26ec546
commit
1a336f9289
@ -1,5 +1,3 @@
|
|||||||
package crypto.pb;
|
|
||||||
|
|
||||||
enum KeyType {
|
enum KeyType {
|
||||||
RSA = 0;
|
RSA = 0;
|
||||||
}
|
}
|
||||||
|
@ -60,7 +60,7 @@ function Id (id, privKey, pubKey) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// unwrap the private key protobuf stream
|
// unwrap the private key protobuf
|
||||||
function unmarshal (key) {
|
function unmarshal (key) {
|
||||||
var dpb = messages.PrivateKey.decode(key)
|
var dpb = messages.PrivateKey.decode(key)
|
||||||
return dpb
|
return dpb
|
||||||
|
@ -18,8 +18,8 @@ const testIdB58String = 'QmQ2zigjQikYnyYUSXZydNXrDRhBut2mubwJBaLXobMt3A'
|
|||||||
describe('id', function (done) {
|
describe('id', function (done) {
|
||||||
this.timeout(30000)
|
this.timeout(30000)
|
||||||
it('create a new id', done => {
|
it('create a new id', done => {
|
||||||
// this will always be randomly generated. is there something i can test it against?
|
|
||||||
var id = PeerId.create()
|
var id = PeerId.create()
|
||||||
|
expect(id.toB58String().length).to.equal(46)
|
||||||
done()
|
done()
|
||||||
})
|
})
|
||||||
it('recreate an Id from Hex string', done => {
|
it('recreate an Id from Hex string', done => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user