"{\"kty\":\"oct\",\"kid\":\"18ec08e1-bfa9-4d95-b205-2b4dd1d4321d\",\"use\":\"enc\",\"alg\":\"A256GCMKW\",\"k\":\"qC57l_uxcm7Nm3K-ct4GFjx8tM1U8CZ0NLBvdQstiS8\"}]}";
// verify that we can decrypt it
JsonWebEncryption jwe = new JsonWebEncryption();
jwe.setCompactSerialization(exampleCompactSerialization);
jwe.setKey(new PbkdfKey(password));
assertThat(plaintext, equalTo(jwe.getPlaintextString()));
// verify that we can reproduce it from the inputs
jwe = new JsonWebEncryption();
jwe.setPlaintext(plaintext);
jwe.setKey(new PbkdfKey(password));
jwe.setAlgorithmHeaderValue(KeyManagementAlgorithmIdentifiers.PBES2_HS512_A256KW);
Headers headers = jwe.getHeaders();
headers.setStringHeaderValue(HeaderParameterNames.PBES2_SALT_INPUT, "8Q1SzinasR3xchYz6ZZcHA");
headers.setObjectHeaderValue(HeaderParameterNames.PBES2_ITERATION_COUNT, 8192L);