Skip to content

JSON Signer offers a robust solution for signing JSON content with SHA256, providing developers with a reliable method to ensure getting identical signature for the same payload even when the json key shape get changes during string conversion

License

Notifications You must be signed in to change notification settings

DraviaVemal/JSON-Signature

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JSON-Signature Generator

This package enables the generation of unique hash signatures for provided payloads. It normalise json key order so the same payload data with different key order generates same key.

Installation

You can install this package via pip:

npm i json-signature

Usage

import { JsonSignature } from "json-signature";

console.log(
  JsonSignature.GetSignatureForData(
    {
      key1: "value1",
      key2: "value2",
      array_key: [1, 2, 3],
    },
    {
      hashType: "sha256",
      digestType: "hex",
      ignoreArrayOrder: true,
    }
  )
);

Contribution

Contributions are welcome! If you encounter issues or have suggestions for improvements, feel free to open an issue or submit a pull request on GitHub.

License

This package is licensed under the MIT License.

Contact

For inquiries or support, please contact [email protected].

About

JSON Signer offers a robust solution for signing JSON content with SHA256, providing developers with a reliable method to ensure getting identical signature for the same payload even when the json key shape get changes during string conversion

Resources

License

Stars

Watchers

Forks