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