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

@shardus/crypto-utils

Package Overview
Dependencies
Maintainers
2
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.0.3 to 4.0.4

7

build/src/index.d.ts

@@ -43,6 +43,5 @@ /// <reference types="node" />

*/
export declare function hashObj<T extends {
sign?: Signature;
tag?: string;
}>(obj: T, removeSign?: boolean, removeTag?: boolean): hexstring;
export declare function hashObj(obj: {
[key: string]: any;
}, removeSign?: boolean, removeTag?: boolean): hexstring;
/**

@@ -49,0 +48,0 @@ * Generates and retuns { publicKey, secretKey } as hex strings

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

*/
// Note about the partial - objects with only optional properties are not matching structurally downstream. This is an attempt
// to fix that.
function hashObj(obj, removeSign = false, removeTag = false) {

@@ -68,0 +70,0 @@ if (typeof obj !== 'object') {

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

@@ -47,4 +47,5 @@ "main": "./build/src/index.js",

"gts": "^3.1.0",
"np": "^7.6.0",
"typescript": "^4.4.4"
}
}

@@ -96,3 +96,5 @@ import sodium = require('sodium-native')

*/
export function hashObj<T extends { sign?: Signature, tag?: string }>(obj: T, removeSign = false, removeTag = false): hexstring {
// Note about the partial - objects with only optional properties are not matching structurally downstream. This is an attempt
// to fix that.
export function hashObj(obj: {[key: string]: any}, removeSign = false, removeTag = false): hexstring {
if (typeof obj !== 'object') {

@@ -99,0 +101,0 @@ throw TypeError('Input must be an object.')

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