mirror of
https://github.com/fluencelabs/js-libp2p-crypto
synced 2025-06-23 01:11:48 +00:00
inital commit
This commit is contained in:
20
test/index.spec.js
Normal file
20
test/index.spec.js
Normal 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')
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
Reference in New Issue
Block a user