Nuns Practicing Misanthropy
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

percent-message-signing

0.0.1 • Public • Published

percent-message-signing

usage

sign text

var sign = require('percent-message-signing');
var text = '<your message which needs signing>';
var key = '<a secret shared key>';
 
var signature = sign(key, text); 
 
var valid = sign(key, text, signature); // true

signature will be something like this:

K4ik36Xc4mgTa3kQzTdXqLP9luTZnG6qEPpIvZfG7njusdbSslWpPn6duxNOdr3pLDXrK/u/RNOZkLFHPfVrjA==

sign js objects

var sign = require('percent-message-signing');
var obj =  { abc: 'def', ghi: 123 };
var key = '<a secret shared key>';
 
var signature = sign(key, obj); 
 
var valid = sign(key, obj, signature); // true

Keywords

none

install

npm i percent-message-signing

Downloadsweekly downloads

0

version

0.0.1

license

none

last publish

collaborators

  • avatar
  • avatar
  • avatar
  • avatar
Report a vulnerability