throw new Exception("Error while decrypting token", e);
}
}
static private SecretKeySpec deriveKey(byte[] productionKey, byte[] context) throws Exception {
KDFCounterMode kdf = new KDFCounterModeImpl();
byte[] raw = kdf.deriveKey(productionKey, LABEL, context, 16);
SecretKeySpec encryptionKey = new SecretKeySpec(raw, "AES");
return encryptionKey;
}