code: function generateHsJws(protect, bits, key) {
    if (typeof key === 'string') {
      key = Buffer.from(key, 'base64');
    } else if (!(key instanceof Buffer)) {
      throw new TypeError('Key must be a buffer or a base64 string');
    }
    let bytes = bits >> 3;
    if (key.length < bytes) {
      throw new TypeError(`Key length must be at least ${bytes} bytes`);
    }
    let hmac = crypto.createHmac(`SHA${bits}`, key);
    let mac = buf2b64url(hmac.update(protect).digest());
    return `${protect}.${mac}`;
  }
docs: ===== HS256, HS384, HS512 ==================================================