@Test
public void ScryptDecodingTest() throws Exception
{

    byte[] password = PasswordToByteConverter.convert("password");
    byte[] encoded = Base64.decode("MCwGCSsGAQQB2kcECzAfBBAcO15L0rQ01O2RJ5UhyqCdAgICAAIBEAIBAgIBIA==");
    KeyDerivationFunction kdf = getKDFInstance(new ScryptParameters(32, 512, 2, 16, Hex.decode("1c3b5e4bd2b434d4ed91279521caa09d")));
    KeyWithIVParameters params = kdf.derive(password, 8);
    KeyDerivationFunction kdf2 = factory.getInstance(encoded);
    KeyWithIVParameters params2 = kdf2.derive(password, 8);
    assertThat(kdf.getEncoded(), equalTo(encoded));
    assertThat(params.getKey(), equalTo(params2.getKey()));
    assertThat(params2.getIV(), equalTo(params2.getIV()));
}