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.19.5 to 0.19.6

8

nacl/decrypt.js

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

@name naclDecrypt
@signature naclDecrypt (message: Uint8Array, secretKey: Uint8Array, nonce: Uint8Array): Uint8Array
@signature naclDecrypt (message: Uint8Array, nonce: Uint8Array, secret: Uint8Array): Uint8Array
@summary Decrypts a message using the supplied secretKey and nonce
@description
Returns an decrypted message, using the `secretKey` and `nonce`.
Returns an decrypted message, using the `secret` and `nonce`.
@example

@@ -20,4 +20,4 @@ import { naclDecrypt } from '@polkadot/util-crypto';

*/
module.exports = function naclDecrypt(message, secret, nonce) {
return nacl.secretbox.open(message, nonce, secret);
module.exports = function naclDecrypt(encrypted, nonce, secret) {
return nacl.secretbox.open(encrypted, nonce, secret);
};

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

@name naclEncrypt
@signature naclEncrypt (message: Uint8Array, secretKey: Uint8Array, nonce?: Uint8Array): { encrypted: Uint8Array, nonce: Uint8Array }
@signature naclEncrypt (message: Uint8Array, secret: Uint8Array, nonce?: Uint8Array): { encrypted: Uint8Array, nonce: Uint8Array }
@summary Encrypts a message using the supplied secretKey and nonce

@@ -25,8 +25,6 @@ @description

var encrypted = nacl.secretbox(message, nonce, secret);
return {
encrypted: encrypted,
encrypted: nacl.secretbox(message, nonce, secret),
nonce: nonce
};
};
{
"name": "@polkadot/util-crypto",
"version": "0.19.5",
"version": "0.19.6",
"description": "A collection of useful crypto utilities for @polkadot",

@@ -5,0 +5,0 @@ "main": "index.js",

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