diff options
author | Tor Brede Vekterli <vekterli@yahooinc.com> | 2022-10-25 15:07:48 +0200 |
---|---|---|
committer | Tor Brede Vekterli <vekterli@yahooinc.com> | 2022-10-25 15:07:48 +0200 |
commit | 9b883fa23c8be0279c94d8d0b21c6058ee7e6bd0 (patch) | |
tree | d9cea17fcf58c3125d26b9edf19aa536e83bba66 /security-utils/src/test/java/com/yahoo/security/SharedKeyTest.java | |
parent | 2dc4c6b58004d51af887c49760a98804803ab73f (diff) |
Use JDK17's own hex utilities instead of BouncyCastle's
Diffstat (limited to 'security-utils/src/test/java/com/yahoo/security/SharedKeyTest.java')
-rw-r--r-- | security-utils/src/test/java/com/yahoo/security/SharedKeyTest.java | 4 |
1 files changed, 2 insertions, 2 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 e63c0c48e9d..57c89c89665 100644 --- a/security-utils/src/test/java/com/yahoo/security/SharedKeyTest.java +++ b/security-utils/src/test/java/com/yahoo/security/SharedKeyTest.java @@ -1,7 +1,6 @@ // Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.security; -import org.bouncycastle.util.encoders.Hex; import org.junit.jupiter.api.Test; import javax.crypto.CipherInputStream; @@ -12,6 +11,7 @@ import java.io.IOException; import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; +import static com.yahoo.security.ArrayUtils.hex; import static org.junit.jupiter.api.Assertions.assertArrayEquals; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; @@ -52,7 +52,7 @@ public class SharedKeyTest { var theirSealed = SealedSharedKey.fromTokenString(publicToken); var theirShared = SharedKeyGenerator.fromSealedKey(theirSealed, receiverPrivate); - assertEquals(expectedSharedSecret, Hex.toHexString(theirShared.secretKey().getEncoded())); + assertEquals(expectedSharedSecret, hex(theirShared.secretKey().getEncoded())); } @Test |