Socket
Book a DemoInstallSign in
Socket

signobj

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

signobj

Sign and validate JSON objects!

latest
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

signobj–Trust your JSON Build Status

signobj protects your data with SHA-1 HMAC & a 16 bit salt.

signobj(data, secret, [hidden], [no_salt], [cb]) -> Promise

Signs data with secret, you can also pass in some extra hidden data that is used when hashing. This can be useful if you're creating an access token, and you want it to become invalid when they change their password, and also don't want the password with the public data.

This function returns a Q promise, that resolves the signed & salted data.

signobj.valid(signed_data, secret, [hidden], [cb]) -> Promise

Checks to make sure your data is valid. The promise, if resolves successfully, will return your original data.

License

MIT

Keywords

crypto

FAQs

Package last updated on 24 Jan 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts