Socket
Socket
Sign inDemoInstall

crypto-browserify

Package Overview
Dependencies
38
Maintainers
5
Versions
75
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.11.0 to 3.11.1

117

index.js

@@ -7,3 +7,5 @@ 'use strict'

var hashes = ['sha1', 'sha224', 'sha256', 'sha384', 'sha512', 'md5', 'rmd160'].concat(Object.keys(require('browserify-sign/algos')))
var algos = require('browserify-sign/algos')
var algoKeys = Object.keys(algos)
var hashes = ['sha1', 'sha224', 'sha256', 'sha384', 'sha512', 'md5', 'rmd160'].concat(algoKeys)
exports.getHashes = function () {

@@ -18,38 +20,29 @@ return hashes

var aes = require('browserify-cipher')
;[
'Cipher',
'createCipher',
'Cipheriv',
'createCipheriv',
'Decipher',
'createDecipher',
'Decipheriv',
'createDecipheriv',
'getCiphers',
'listCiphers'
].forEach(function (key) {
exports[key] = aes[key]
})
exports.Cipher = aes.Cipher
exports.createCipher = aes.createCipher
exports.Cipheriv = aes.Cipheriv
exports.createCipheriv = aes.createCipheriv
exports.Decipher = aes.Decipher
exports.createDecipher = aes.createDecipher
exports.Decipheriv = aes.Decipheriv
exports.createDecipheriv = aes.createDecipheriv
exports.getCiphers = aes.getCiphers
exports.listCiphers = aes.listCiphers
var dh = require('diffie-hellman')
;[
'DiffieHellmanGroup',
'createDiffieHellmanGroup',
'getDiffieHellman',
'createDiffieHellman',
'DiffieHellman'
].forEach(function (key) {
exports[key] = dh[key]
})
exports.DiffieHellmanGroup = dh.DiffieHellmanGroup
exports.createDiffieHellmanGroup = dh.createDiffieHellmanGroup
exports.getDiffieHellman = dh.getDiffieHellman
exports.createDiffieHellman = dh.createDiffieHellman
exports.DiffieHellman = dh.DiffieHellman
var sign = require('browserify-sign')
;[
'createSign',
'Sign',
'createVerify',
'Verify'
].forEach(function (key) {
exports[key] = sign[key]
})
exports.createSign = sign.createSign
exports.Sign = sign.Sign
exports.createVerify = sign.createVerify
exports.Verify = sign.Verify
exports.createECDH = require('create-ecdh')

@@ -59,22 +52,44 @@

;[
'publicEncrypt',
'privateEncrypt',
'publicDecrypt',
'privateDecrypt'
].forEach(function (key) {
exports[key] = publicEncrypt[key]
})
exports.publicEncrypt = publicEncrypt.publicEncrypt
exports.privateEncrypt = publicEncrypt.privateEncrypt
exports.publicDecrypt = publicEncrypt.publicDecrypt
exports.privateDecrypt = publicEncrypt.privateDecrypt
// the least I can do is make error messages for the rest of the node.js/crypto api.
;[
'createCredentials'
].forEach(function (name) {
exports[name] = function () {
throw new Error([
'sorry, ' + name + ' is not implemented yet',
'we accept pull requests',
'https://github.com/crypto-browserify/crypto-browserify'
].join('\n'))
}
})
// ;[
// 'createCredentials'
// ].forEach(function (name) {
// exports[name] = function () {
// throw new Error([
// 'sorry, ' + name + ' is not implemented yet',
// 'we accept pull requests',
// 'https://github.com/crypto-browserify/crypto-browserify'
// ].join('\n'))
// }
// })
exports.createCredentials = function () {
throw new Error([
'sorry, createCredentials is not implemented yet',
'we accept pull requests',
'https://github.com/crypto-browserify/crypto-browserify'
].join('\n'))
}
exports.constants = {
'DH_CHECK_P_NOT_SAFE_PRIME': 2,
'DH_CHECK_P_NOT_PRIME': 1,
'DH_UNABLE_TO_CHECK_GENERATOR': 4,
'DH_NOT_SUITABLE_GENERATOR': 8,
'NPN_ENABLED': 1,
'ALPN_ENABLED': 1,
'RSA_PKCS1_PADDING': 1,
'RSA_SSLV23_PADDING': 2,
'RSA_NO_PADDING': 3,
'RSA_PKCS1_OAEP_PADDING': 4,
'RSA_X931_PADDING': 5,
'RSA_PKCS1_PSS_PADDING': 6,
'POINT_CONVERSION_COMPRESSED': 2,
'POINT_CONVERSION_UNCOMPRESSED': 4,
'POINT_CONVERSION_HYBRID': 6
}

@@ -5,3 +5,3 @@ {

"description": "implementation of crypto for the browser",
"version": "3.11.0",
"version": "3.11.1",
"homepage": "https://github.com/crypto-browserify/crypto-browserify",

@@ -8,0 +8,0 @@ "repository": {

@@ -27,2 +27,3 @@ # crypto-browserify

* publicEncrypt/privateDecrypt (rsa)
* privateEncrypt/publicDecrypt (rsa)

@@ -29,0 +30,0 @@ ## todo

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc