0.1.0 • Published 11 years ago

signobj v0.1.0

Weekly downloads
5
License
-
Repository
github
Last release
11 years ago

signobjTrust 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

0.1.0

11 years ago

0.0.1

11 years ago