mirror of
https://github.com/fluencelabs/js-libp2p-crypto
synced 2025-03-15 17:10:50 +00:00
21 lines
481 B
JavaScript
21 lines
481 B
JavaScript
|
/* 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')
|
||
|
})
|
||
|
})
|
||
|
})
|
||
|
})
|