code: function signStanza(stanza, fields, privkey) {
    stanza.sig = generateStanzaSig(stanza, fields, privkey);
    return stanza;
  }
docs: 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.