inital commit

This commit is contained in:
dignifiedquire
2016-05-19 18:47:48 +02:00
commit 37edb7d0e4
13 changed files with 401 additions and 0 deletions

20
test/index.spec.js Normal file
View File

@ -0,0 +1,20 @@
/* eslint-env mocha */
'use strict'
const expect = require('chai').expect
const crypto = require('../src')
describe('libp2p-crypto', () => {
describe('generateKeyPair', () => {
describe('RSA', () => {
it('generates a valid key', () => {
const key = crypto.generateKeyPair('RSA', 2048)
expect(key).to.have.property('publicKey')
expect(key).to.have.property('privateKey')
expect(key).to.have.property('buffer')
})
})
})
})