Compare commits

...

6 Commits

Author SHA1 Message Date
Friedel Ziegelmayer
1f4823e202 chore: release version v0.3.1 2016-05-20 16:28:37 +02:00
Friedel Ziegelmayer
c33530186a chore: update contributors 2016-05-20 16:28:37 +02:00
Friedel Ziegelmayer
87a30e2e9b fix: workaround missing sha512 support in forge.hmac 2016-05-20 16:27:11 +02:00
Friedel Ziegelmayer
3037541d3c chore: release version v0.3.0 2016-05-20 16:05:12 +02:00
Friedel Ziegelmayer
c586a8825b chore: update contributors 2016-05-20 16:05:12 +02:00
Friedel Ziegelmayer
b07bca569c fix package name 2016-05-20 16:03:54 +02:00
3 changed files with 5 additions and 5 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "js-libp2p-crypto",
"version": "0.2.0",
"name": "libp2p-crypto",
"version": "0.3.1",
"description": "Crypto primitives for libp2p",
"main": "lib/index.js",
"jsnext:main": "src/index.js",

View File

@@ -21,7 +21,8 @@ const cipherMap = {
const hashMap = {
SHA1: 'sha1',
SHA256: 'sha256',
SHA512: 'sha512'
// workaround for https://github.com/digitalbazaar/forge/issues/401
SHA512: forge.md.sha512.create()
}
// Generates a set of keys for each party by stretching the shared key.

View File

@@ -9,8 +9,7 @@ const fixtures = require('./fixtures/go-stretch-key')
describe('keyStretcher', () => {
describe('generate', () => {
const ciphers = ['AES-128', 'AES-256', 'Blowfish']
const hashes = ['SHA1', 'SHA256']
// add 'SHA512' when https://github.com/digitalbazaar/forge/issues/401 is resolved
const hashes = ['SHA1', 'SHA256', 'SHA512']
const res = crypto.generateEphemeralKeyPair('P-256')
const secret = res.genSharedKey(res.key)