code: private byte[] calculateHmacSHA256(String data, byte[] key)
              throws NoSuchAlgorithmException, InvalidKeyException, UnsupportedEncodingException {
          Mac mac = Mac.getInstance(HMAC_ALGORITHM);
          mac.init(new SecretKeySpec(key, HMAC_ALGORITHM));
          return mac.doFinal(data.getBytes(ENCODING));
      }
docs: Calculates the keyed-hash message authentication code for the data string.
  
  @param data String for which the HMAC will be calculated.
  @param key  Key used for HMAC calculation.
  @return HMAC's bytes. This result is not encoded.