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

@polkadot/util-crypto

Package Overview
Dependencies
Maintainers
1
Versions
1357
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@polkadot/util-crypto - npm Package Compare versions

Comparing version 0.14.1 to 0.14.2

4

keccak/asBuffer.js

@@ -10,3 +10,3 @@ 'use strict';

@name keccakAsBuffer
@signature keccakAsBuffer (value: Buffer | string): Buffer
@signature keccakAsBuffer (value: Buffer | Uint8Array | string): Buffer
@summary Creates a keccak Buffer from the input.

@@ -21,3 +21,5 @@ @description

module.exports = function keccakAsBuffer(value) {
// HACK: For the time being, don't change the definition (although fork of library is used)
// flowlint-next-line unclear-type:off
return createKeccak('keccak256').update(value).digest();
};

@@ -12,3 +12,3 @@ 'use strict';

@name keccakAsHex
@signature keccakAsHex (value: Buffer | string): string
@signature keccakAsHex (value: Buffer | Uint8Array | string): string
@summary Creates a keccak hex string from the input.

@@ -15,0 +15,0 @@ @description

@@ -10,3 +10,3 @@ 'use strict';

@name keccakAsString
@signature keccakAsString (value: Buffer | string): string
@signature keccakAsString (value: Buffer | Uint8Array | string): string
@summary Creates a keccak string from the input.

@@ -13,0 +13,0 @@ @description

@@ -7,7 +7,7 @@ 'use strict';

var bufferToU8a = require('@polkadot/util/buffer/toU8a');
var createKeccak = require('keccak');
var keccakAsBuffer = require('./asBuffer');
/**
@name keccakAsU8a
@signature keccakAsU8a (value: Buffer | string): Uint8Array
@signature keccakAsU8a (value: Buffer | Uint8Array | string): Uint8Array
@summary Creates a keccak Uint8Array from the input.

@@ -22,3 +22,3 @@ @description

module.exports = function keccakAsU8a(value) {
return bufferToU8a(createKeccak('keccak256').update(value).digest());
return bufferToU8a(keccakAsBuffer(value));
};
{
"name": "@polkadot/util-crypto",
"version": "0.14.1",
"version": "0.14.2",
"description": "A collection of useful crypto utilities for @polkadot",

@@ -34,3 +34,3 @@ "main": "index.js",

"blakejs": "^1.1.0",
"keccak": "^1.3.0",
"keccak": "jacogr/keccak#f25ae4b299038bb2f0b72f150b99b5048ffb9e48",
"tweetnacl": "^1.0.0",

@@ -37,0 +37,0 @@ "xxhashjs": "^0.2.2"

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

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