@Test
public void scryptSerializationDeserializationTest() throws Exception
{

    byte[] password = PasswordToByteConverter.convert("password");
    KeyDerivationFunction kdf = getKDFInstance(new ScryptParameters(64, 512, 8));
    KeyWithIVParameters params = kdf.derive(password, 8);
    KeyDerivationFunction kdf2 = factory.getInstance(kdf.getEncoded());
    KeyWithIVParameters params2 = kdf2.derive(password, 8);
    assertThat(params.getKey(), equalTo(params2.getKey()));
    assertThat(params2.getIV(), equalTo(params2.getIV()));
}