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 2d4b225 commit 81294b5
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", decrypted, secret);
Assert.assertEquals("PicketBox encrypted, Elytron decrypted in compatible mode, failed", crossDecrypted, secret);
Assert.assertEquals("Elytron in compatible mode encrypted, PicketBox encrypted must be the same", pbGenerated, encrypted);

}

Expand Down

0 comments on commit 81294b5

Please sign in to comment.