Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@nodefactory/bls-keystore

Package Overview
Dependencies
Maintainers
3
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nodefactory/bls-keystore - npm Package Compare versions

Comparing version 1.0.0-beta3 to 1.0.0-beta4

6

lib/crypto/module/params/pbkdf2.js

@@ -8,6 +8,6 @@ "use strict";

var _random = require("bcrypto/lib/random");
var _deepmerge = require("../../../utils/deepmerge");
var _crypto = require("../../../utils/crypto");
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }

@@ -20,3 +20,3 @@

const DefaultPBKDF2Params = {
salt: (0, _random.randomBytes)(32),
salt: (0, _crypto.randomBytes)(32),
c: 262144,

@@ -23,0 +23,0 @@ dklen: 32,

@@ -8,6 +8,6 @@ "use strict";

var _random = require("bcrypto/lib/random");
var _deepmerge = require("../../../utils/deepmerge");
var _crypto = require("../../../utils/crypto");
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }

@@ -20,3 +20,3 @@

const DefaultScryptParams = {
salt: (0, _random.randomBytes)(32),
salt: (0, _crypto.randomBytes)(32),
dklen: 32,

@@ -23,0 +23,0 @@ n: 262144,

@@ -14,4 +14,2 @@ "use strict";

var _random = require("bcrypto/lib/random");
var _buffer = require("buffer");

@@ -68,3 +66,3 @@

static encrypt(secret, password, path = "", crypto = _crypto2.CryptoFunction.pbkdf2, kdfSalt = (0, _random.randomBytes)(32), aesIv = (0, _random.randomBytes)(16)) {
static encrypt(secret, password, path = "", crypto = _crypto2.CryptoFunction.pbkdf2, kdfSalt = (0, _crypto.randomBytes)(32), aesIv = (0, _crypto.randomBytes)(16)) {
const kdfModule = new _crypto2.KdfModule({

@@ -71,0 +69,0 @@ function: crypto,

@@ -12,1 +12,2 @@ /// <reference types="node" />

export declare function kdf(password: string, func: CryptoFunction, args: KdfModuleParams): bytes;
export declare function randomBytes(length: number): Buffer;

@@ -11,2 +11,3 @@ "use strict";

exports.kdf = kdf;
exports.randomBytes = randomBytes;

@@ -61,2 +62,11 @@ var _sha = _interopRequireDefault(require("bcrypto/lib/sha256"));

}
//# sourceMappingURL=crypto.js.map
function randomBytes(length) {
if (process && process.env.ELECTRON) {
//electron
return require("bcrypto/lib/node/random").randomBytes(length);
} else {
return require("bcrypto/lib/random").randomBytes(length);
}
}
//# sourceMappingURL=crypto.js.map
{
"name": "@nodefactory/bls-keystore",
"version": "1.0.0-beta3",
"version": "1.0.0-beta4",
"main": "lib/index.js",

@@ -5,0 +5,0 @@ "files": [

@@ -11,4 +11,8 @@ # @nodefactory/bls-keystore

##### Electron usage
- Set env variable ELECTRON=true because electron replaces openssl with BoreSSL which
causes some incompatibilities when using native modules.
### How to use?
```javascript

@@ -15,0 +19,0 @@ import {Buffer} from "buffer";

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc