UNPKG

secure-peer

Version:

peer-to-peer encrypted streams using public key cryptography and signing

8 lines (6 loc) 201 B
var crypto = require('crypto'); module.exports = function hash (key, payload) { var signer = crypto.createSign('RSA-SHA256'); signer.update(payload); return signer.sign(key, 'base64'); };