summary refs log tree commit diff
path: root/crypto/src/security
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2022-11-23 21:08:34 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2022-11-23 21:08:34 +0700
commit29a112bef25c63c03da142e665f027f00bd496b0 (patch)
treef5e2d730f84fc9f720a1e20b6b381c2bdefbee71 /crypto/src/security
parentRound 4 modifications to HQC + removed some redundancy (diff)
downloadBouncyCastle.NET-ed25519-29a112bef25c63c03da142e665f027f00bd496b0.tar.xz
Use FixedTimeEquals
Diffstat (limited to 'crypto/src/security')
-rw-r--r--crypto/src/security/JksStore.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/src/security/JksStore.cs b/crypto/src/security/JksStore.cs
index 9f4aced96..c5ef92a70 100644
--- a/crypto/src/security/JksStore.cs
+++ b/crypto/src/security/JksStore.cs
@@ -80,7 +80,7 @@ namespace Org.BouncyCastle.Security
             // integrity check
             byte[] checksum = GetKeyChecksum(digest, password, pkcs8Key);
 
-            if (!Arrays.ConstantTimeAreEqual(20, encryptedData, pkcs8Len + 20, checksum, 0))
+            if (!Arrays.FixedTimeEquals(20, encryptedData, pkcs8Len + 20, checksum, 0))
                 throw new IOException("cannot recover key");
 
             return PrivateKeyFactory.CreateKey(pkcs8Key);
@@ -393,7 +393,7 @@ namespace Org.BouncyCastle.Security
             {
                 byte[] checksum = CalculateChecksum(password, rawStore, 0, checksumPos);
 
-                if (!Arrays.ConstantTimeAreEqual(20, checksum, 0, rawStore, checksumPos))
+                if (!Arrays.FixedTimeEquals(20, checksum, 0, rawStore, checksumPos))
                 {
                     Array.Clear(rawStore, 0, rawStore.Length);
                     throw new IOException("password incorrect or store tampered with");