lib/class/Header.js
function(data) {
      try {
        data = data || this.getContent();
        return this.keychain.sign(JSON.stringify(data));
      } catch(e) {
        throw new CError({
          body: {
            code: 'ImATeapot',
            message: 'unable to sign content',
            cause: e
          }
        }).log('body');
      }
    }
function(data) {
      try {
        data = data || this.getContent();
        return this.keychain.sign(JSON.stringify(data));
      } catch(e) {
        throw new CError({
          body: {
            code: 'ImATeapot',
            message: 'unable to sign content',
            cause: e
          }
        }).log('body');
      }
    }
function ( data ) { try { data = data || this . getContent ( ) ; return this . keychain . sign ( JSON . stringify ( data ) ) ; } catch ( e ) { throw new CError ( { body : { code : 'ImATeapot' , message : 'unable to sign content' , cause : e } } ) . log ( 'body' ) ; } }
Generate a signature for for data or content property

@param {String/Object} data The data to sign or content if missing
@return {String} The signature in Base64 format
Generate a signature for for data or content property