code: function() {
        var content = this.getContent();
        var out = {
          payload: this.getPayload(),
          content: this.cryptContent(content),
          signature: this.generateSignature()
        };
        if (debug) {
          log.debug('%s encode with sid %s', app.name, out.payload.sid);
          log.debug('%s encode with token %s', app.name, content.token);
        }
  
        return forge.util.encode64(JSON.stringify(out));
      }
docs: Encode the header including payload, content and signature
  
  @return {String} The encoded header in Base64 format