mirror of
https://github.com/fluencelabs/js-libp2p-crypto
synced 2025-07-21 17:51:58 +00:00
Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
967594c9a3 | ||
|
03893a3795 | ||
|
50afa4efbc | ||
|
1c54a9b196 | ||
|
6f2c347895 | ||
|
867982ab92 |
@@ -1,3 +1,8 @@
|
||||
<a name="0.16.2"></a>
|
||||
## [0.16.2](https://github.com/libp2p/js-libp2p-crypto/compare/v0.16.1...v0.16.2) (2019-09-25)
|
||||
|
||||
|
||||
|
||||
<a name="0.16.1"></a>
|
||||
## [0.16.1](https://github.com/libp2p/js-libp2p-crypto/compare/v0.16.0...v0.16.1) (2019-02-26)
|
||||
|
||||
|
12
package.json
12
package.json
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "libp2p-crypto",
|
||||
"version": "0.16.1",
|
||||
"version": "0.16.2",
|
||||
"description": "Crypto primitives for libp2p",
|
||||
"main": "src/index.js",
|
||||
"leadMaintainer": "Friedel Ziegelmayer <dignifiedquire@gmail.com>",
|
||||
@@ -45,17 +45,17 @@
|
||||
"keypair": "^1.0.1",
|
||||
"libp2p-crypto-secp256k1": "~0.3.0",
|
||||
"multihashing-async": "~0.5.1",
|
||||
"node-forge": "~0.7.6",
|
||||
"node-forge": "^0.8.5",
|
||||
"pem-jwk": "^2.0.0",
|
||||
"protons": "^1.0.1",
|
||||
"rsa-pem-to-jwk": "^1.1.3",
|
||||
"tweetnacl": "^1.0.0",
|
||||
"ursa-optional": "~0.9.10"
|
||||
"ursa-optional": "~0.10.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"aegir": "^18.0.3",
|
||||
"aegir": "^20.0.0",
|
||||
"benchmark": "^2.1.4",
|
||||
"bundlesize": "~0.17.0",
|
||||
"bundlesize": "^0.18.0",
|
||||
"chai": "^4.2.0",
|
||||
"chai-string": "^1.5.0",
|
||||
"dirty-chai": "^2.0.1"
|
||||
@@ -89,6 +89,8 @@
|
||||
"Vasco Santos <vasco.santos@ua.pt>",
|
||||
"Victor Bjelkholm <victorbjelkholm@gmail.com>",
|
||||
"Yusef Napora <yusef@napora.org>",
|
||||
"achingbrain <alex@achingbrain.net>",
|
||||
"dignifiedquire <dignifiedquire@users.noreply.github.com>",
|
||||
"greenkeeper[bot] <greenkeeper[bot]@users.noreply.github.com>",
|
||||
"nikuda <nikuda@gmail.com>"
|
||||
]
|
||||
|
@@ -28,7 +28,7 @@ exports.generateEphemeralKeyPair = require('./ephemeral-keys')
|
||||
|
||||
// Generates a keypair of the given type and bitsize
|
||||
exports.generateKeyPair = (type, bits, cb) => {
|
||||
let key = supportedKeys[type.toLowerCase()]
|
||||
const key = supportedKeys[type.toLowerCase()]
|
||||
|
||||
if (!key) {
|
||||
return cb(new Error('invalid or unsupported key type'))
|
||||
@@ -40,7 +40,7 @@ exports.generateKeyPair = (type, bits, cb) => {
|
||||
// Generates a keypair of the given type and bitsize
|
||||
// seed is a 32 byte uint8array
|
||||
exports.generateKeyPairFromSeed = (type, seed, bits, cb) => {
|
||||
let key = supportedKeys[type.toLowerCase()]
|
||||
const key = supportedKeys[type.toLowerCase()]
|
||||
if (!key) {
|
||||
return cb(new Error('invalid or unsupported key type'))
|
||||
}
|
||||
|
@@ -47,7 +47,7 @@ module.exports = (cipherType, hash, secret, callback) => {
|
||||
return callback(err)
|
||||
}
|
||||
|
||||
let result = []
|
||||
const result = []
|
||||
let j = 0
|
||||
|
||||
whilst(
|
||||
|
@@ -6,7 +6,7 @@ const BN = require('asn1.js').bignum
|
||||
// Adapted from https://tools.ietf.org/html/draft-ietf-jose-json-web-signature-41#appendix-C
|
||||
exports.toBase64 = function toBase64 (bn, len) {
|
||||
// if len is defined then the bytes are leading-0 padded to the length
|
||||
let s = bn.toArrayLike(Buffer, 'be', len).toString('base64')
|
||||
const s = bn.toArrayLike(Buffer, 'be', len).toString('base64')
|
||||
|
||||
return s
|
||||
.replace(/(=*)$/, '') // Remove any trailing '='s
|
||||
|
@@ -19,7 +19,7 @@ function doTests (fncName, fnc, num, skipBuffersAndStrings) {
|
||||
// skip this garbage because it's a buffer or a string and we were told do do that
|
||||
return
|
||||
}
|
||||
let args = []
|
||||
const args = []
|
||||
for (let i = 0; i < num; i++) {
|
||||
args.push(garbage)
|
||||
}
|
||||
|
@@ -24,7 +24,7 @@ describe('Util', () => {
|
||||
})
|
||||
|
||||
it('toBase64 zero padding', (done) => {
|
||||
let bnpad = new BN('ff', 16)
|
||||
const bnpad = new BN('ff', 16)
|
||||
expect(util.toBase64(bnpad, 2)).to.eql('AP8')
|
||||
done()
|
||||
})
|
||||
|
Reference in New Issue
Block a user