Skip to content

Commit 2f5164c

Browse files
committed
use bundled crypto
1 parent 2d48880 commit 2f5164c

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

test/ecdh.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ var mods = [
66
]
77
var test = require('tape')
88
var createECDH1 = require('../').createECDH
9+
if (process.browser && typeof createECDH1 !== 'function') {
10+
createECDH1 = require('crypto').createECDH
11+
}
912
var createECDH2 = require('create-ecdh/browser')
1013

1114
mods.forEach(function (mod) {

test/public-encrypt.js

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/sign.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
var test = require('tape')
22
var nodeCrypto = require('../')
3+
if (process.browser && typeof nodeCrypto === 'undefined') {
4+
nodeCrypto = require('crypto')
5+
}
36
var ourCrypto = require('browserify-sign/browser')
47

58
var rsa = {

0 commit comments

Comments
 (0)