summaryrefslogtreecommitdiffstats
path: root/security-utils/src/test/java/com
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@vespa.ai>2023-04-17 13:42:05 +0200
committerJon Bratseth <bratseth@vespa.ai>2023-04-17 13:42:05 +0200
commit2e2d9c57a39425273d12b49183b55b46b5c680b2 (patch)
treea43c07e48fa822c1c9330cdf3edd64cbfa2cbf4e /security-utils/src/test/java/com
parentb66f35888ad413800ac16f841582da5bf067cb7f (diff)
Build with jdk20
Diffstat (limited to 'security-utils/src/test/java/com')
-rw-r--r--security-utils/src/test/java/com/yahoo/security/SharedKeyTest.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/security-utils/src/test/java/com/yahoo/security/SharedKeyTest.java b/security-utils/src/test/java/com/yahoo/security/SharedKeyTest.java
index 26627e9a5fa..90b8beb461f 100644
--- a/security-utils/src/test/java/com/yahoo/security/SharedKeyTest.java
+++ b/security-utils/src/test/java/com/yahoo/security/SharedKeyTest.java
@@ -285,12 +285,12 @@ public class SharedKeyTest {
String plaintext = "...hello world?";
byte[] encrypted = streamEncryptString(plaintext, myShared);
// Corrupt MAC tag in ciphertext
- encrypted[encrypted.length - 1] ^= 0x80;
+ encrypted[encrypted.length - 1] ^= (byte)0x80;
// We don't necessarily know _which_ exception is thrown, but one _should_ be thrown!
assertThrows(Exception.class, () -> doOutputStreamCipherDecrypt(myShared, encrypted));
// Also try with corrupted ciphertext (pre MAC tag)
- encrypted[encrypted.length - 1] ^= 0x80; // Flip MAC bit back to correct state
- encrypted[encrypted.length - 17] ^= 0x80; // Pre 128-bit MAC tag
+ encrypted[encrypted.length - 1] ^= (byte)0x80; // Flip MAC bit back to correct state
+ encrypted[encrypted.length - 17] ^= (byte)0x80; // Pre 128-bit MAC tag
assertThrows(Exception.class, () -> doOutputStreamCipherDecrypt(myShared, encrypted));
}