cleanup changes

This commit is contained in:
nginnever 2016-02-12 19:55:44 -08:00
parent 67c26ec546
commit 1a336f9289
3 changed files with 2 additions and 4 deletions

View File

@ -1,5 +1,3 @@
package crypto.pb;
enum KeyType { enum KeyType {
RSA = 0; RSA = 0;
} }

View File

@ -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

View File

@ -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 => {