Skip to content

Commit

Permalink
test: add key with invalid length
Browse files Browse the repository at this point in the history
  • Loading branch information
TheUnderScorer committed Jan 25, 2024
1 parent eafb437 commit f80e467
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/test/java/com/fingerprint/SealedTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ public void unsealEventResponseWithInvalidHeaderTest() throws Exception {
Base64.getDecoder().decode("p2PA7MGy5tx56cnyJaFZMr96BCFwZeHjZV2EqMvTq54="),
Sealed.DecryptionAlgorithm.AES_256_GCM
),
new Sealed.DecryptionKey(
//Invalid key
Base64.getDecoder().decode("aW52YWxpZA=="),
Sealed.DecryptionAlgorithm.AES_256_GCM
),
new Sealed.DecryptionKey(
key,
Sealed.DecryptionAlgorithm.AES_256_GCM
Expand All @@ -74,6 +79,10 @@ public void unsealEventResponseWithInvalidKeysTest() throws Exception {
new Sealed.DecryptionKey(
Base64.getDecoder().decode("p2PA7MGy5tx56cnyJacZMr96BCFwZeHjZV2EqMvTq54="),
Sealed.DecryptionAlgorithm.AES_256_GCM
),
new Sealed.DecryptionKey(
Base64.getDecoder().decode("aW52YWxpZA=="),
Sealed.DecryptionAlgorithm.AES_256_GCM
)
}
));
Expand Down

0 comments on commit f80e467

Please sign in to comment.