// 1. If dkLen > (2^32 - 1) * hLen, output "derived key too long" and
// stop.
long maxDerivedKeyLength = 4294967295L; // value of (long) Math.pow(2, 32) - 1;
if (dkLen > maxDerivedKeyLength)
{
throw new UncheckedJoseException("derived key too long " + dkLen);
}
// 2. Let l be the number of hLen-octet blocks in the derived key,
// rounding up, and let r be the number of octets in the last
// block: