Skip to content

Commit 572e020

Browse files
committed
Assert current behavior
1 parent a5ab424 commit 572e020

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/test/java/org/apache/commons/codec/digest/Sha512CryptTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
*/
1717
package org.apache.commons.codec.digest;
1818

19+
import static org.junit.jupiter.api.Assertions.assertArrayEquals;
1920
import static org.junit.jupiter.api.Assertions.assertEquals;
2021
import static org.junit.jupiter.api.Assertions.assertThrows;
2122
import static org.junit.jupiter.api.Assertions.assertTrue;
@@ -98,5 +99,7 @@ public void testSha256LargetThanBlocksize() {
9899
final byte[] buffer = new byte[200];
99100
Arrays.fill(buffer, 0, 200, (byte)'A');
100101
assertEquals("$6$abc$oP/h8PRhCKIA66KSTjGwNsQMSLLZnuFOTjOhrqNrDkKgjTlpePSqibB0qtmDapMbP/zN1cUEYSeHFrpgqZ.GG1", Sha2Crypt.sha512Crypt(buffer, "$6$abc"));
102+
// input password is 0-filled on return
103+
assertArrayEquals(new byte[buffer.length], buffer);
101104
}
102105
}

0 commit comments

Comments
 (0)