@shardus/crypto-utils
Advanced tools
Comparing version 4.0.3 to 4.0.4
@@ -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
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
102957
2204
5
1