@polkadot/util-crypto
Advanced tools
Comparing version 0.19.5 to 0.19.6
@@ -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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
97392
800