code: boolean verifySignatureFor(String algorithm, byte[] secretBytes, byte[] headerBytes, byte[] payloadBytes, byte[] signatureBytes) throws NoSuchAlgorithmException, InvalidKeyException {
          return MessageDigest.isEqual(createSignatureFor(algorithm, secretBytes, headerBytes, payloadBytes), signatureBytes);
      }
docs: Verify signature for JWT header and payload.
  
  @param algorithm algorithm name.
  @param secretBytes algorithm secret.
  @param headerBytes JWT header.
  @param payloadBytes JWT payload.
  @param signatureBytes JWT signature.
  @return true if signature is valid.
  @throws NoSuchAlgorithmException if the algorithm is not supported.
  @throws InvalidKeyException if the given key is inappropriate for initializing the specified algorithm.