vox-common/authentication.js
function signStanza(stanza, fields, privkey) {
  stanza.sig = generateStanzaSig(stanza, fields, privkey);
  return stanza;
}
function signStanza(stanza, fields, privkey) {
  stanza.sig = generateStanzaSig(stanza, fields, privkey);
  return stanza;
}
function signStanza ( stanza , fields , privkey ) { stanza . sig = generateStanzaSig ( stanza , fields , privkey ) ; return stanza ; }
Signs a stanza with the given private key.

@param {Object} stanza The object to sign.
@param {Array<String>} fields The name of the fields to include in the
signature.
@param {String} privkey The private key to use to sign, in PEM format.
@returns {Object} The given stanza, with `sig` set to the signature.
Signs a stanza with the given private key .