hmac(data) {
    return crypto.createHmac('sha256', this.getKey()).update(data, 'utf8').digest(); // .digest('hex');
  }
Returns the HMAC for the current key (sessionKey if set for protocol 3.4, 3.5 or key)
@param {Buffer} data data to hash
@returns {Buffer} HMAC