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

@shardus/crypto-utils

Package Overview
Dependencies
Maintainers
0
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@shardus/crypto-utils - npm Package Compare versions

Comparing version 4.1.4 to 4.1.5

7

build/src/index.d.ts

@@ -107,9 +107,2 @@ /// <reference types="node" />

/**
* Returns true if the hash of the input was signed by the owner of the pk
* @param msg
* @param sig
* @param pk
*/
export declare function verify(msg: string, sig: hexstring | Buffer, pk: publicKey | Buffer): boolean;
/**
* Returns true if the hash of the object minus the sign field matches the signed message in the sign field

@@ -116,0 +109,0 @@ * @param obj

9

build/src/index.js

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

Object.defineProperty(exports, "__esModule", { value: true });
exports.bufferToHex = exports._getAuthKey = exports.generateSharedKey = exports._ensureBuffer = exports.init = exports.verifyObj = exports.verify = exports.signObj = exports.sign = exports.setCustomStringifier = exports.authenticateObj = exports.authenticate = exports.tagObj = exports.tag = exports.convertPkToCurve = exports.convertSkToCurve = exports.generateKeypair = exports.hashObj = exports.hash = exports.randomBytes = exports.stringifierName = exports.stringify = void 0;
exports.bufferToHex = exports._getAuthKey = exports.generateSharedKey = exports._ensureBuffer = exports.init = exports.verifyObj = exports.signObj = exports.sign = exports.setCustomStringifier = exports.authenticateObj = exports.authenticate = exports.tagObj = exports.tag = exports.convertPkToCurve = exports.convertSkToCurve = exports.generateKeypair = exports.hashObj = exports.hash = exports.randomBytes = exports.stringifierName = exports.stringify = void 0;
const sodium_native_1 = __importDefault(require("sodium-native"));

@@ -368,3 +368,7 @@ const buffer_xor_1 = __importDefault(require("buffer-xor"));

*/
function verify(msg, sig, pk) {
// verify fails on non hex strings. to re-export, we would need to make things safer,
// or more flexible but also be mindful to not hurt performance of verfyObj which calls this
// and does not need those extra features. possibly just a verifyInternal clone could be used
function verify(//READ ABOVE , Do not export
msg, sig, pk) {
if (typeof msg !== 'string') {

@@ -385,3 +389,2 @@ throw new TypeError('Message to compare must be a string.');

}
exports.verify = verify;
/**

@@ -388,0 +391,0 @@ * Returns true if the hash of the object minus the sign field matches the signed message in the sign field

{
"name": "@shardus/crypto-utils",
"version": "4.1.4",
"version": "4.1.5",
"description": "Provides simple crypto functions, as used by the ULC Project.",

@@ -48,3 +48,3 @@ "main": "./build/src/index.js",

"@types/buffer-xor": "2.0.0",
"@types/node": "18.16.1",
"@types/node": "18.19.1",
"gts": "^3.1.1",

@@ -63,4 +63,4 @@ "@typescript-eslint/eslint-plugin": "^5.48.0",

"engines": {
"node": "18.16.1"
"node": "18.19.1"
}
}

@@ -413,3 +413,6 @@ export type hexstring = string;

*/
export function verify(
// verify fails on non hex strings. to re-export, we would need to make things safer,
// or more flexible but also be mindful to not hurt performance of verfyObj which calls this
// and does not need those extra features. possibly just a verifyInternal clone could be used
function verify( //READ ABOVE , Do not export
msg: string,

@@ -416,0 +419,0 @@ sig: hexstring | Buffer,

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