Skip to content

Commit

Permalink
[ELY-2685] Replace assert in PasswordBasedEncryptionUtilTest with a p…
Browse files Browse the repository at this point in the history
…roper check
  • Loading branch information
ericrleung committed Oct 13, 2023
1 parent e18938b commit 2761569
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,9 @@ private void checkPb(String secret, String salt, int iteration, String pbGenerat
String crossDecrypted = new String(decryptUtil.decodeAndDecrypt(pbGenerated));
String decrypted = new String(decryptUtil.decodeAndDecrypt(encrypted));

Assert.assertTrue("Elytron in PB compatible mode failed", decrypted.equals(secret));
Assert.assertTrue("PicketBox encrypted, Elytron decrypted in compatible mode, failed", crossDecrypted.equals(secret));
Assert.assertTrue("Elytron in compatible mode encrypted, PicketBox encrypted must be the same", pbGenerated.equals(encrypted));
Assert.assertEquals("Elytron in PB compatible mode failed", secret, decrypted);
Assert.assertEquals("PicketBox encrypted, Elytron decrypted in compatible mode, failed", secret, crossDecrypted);
Assert.assertEquals("Elytron in compatible mode encrypted, PicketBox encrypted must be the same", encrypted, pbGenerated);

}

Expand Down

0 comments on commit 2761569

Please sign in to comment.