summary refs log tree commit diff
path: root/crypto/src/cmp
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/cmp
parentRound 4 modifications to HQC + removed some redundancy (diff)
downloadBouncyCastle.NET-ed25519-29a112bef25c63c03da142e665f027f00bd496b0.tar.xz
Use FixedTimeEquals
Diffstat (limited to 'crypto/src/cmp')
-rw-r--r--crypto/src/cmp/CertificateStatus.cs2
-rw-r--r--crypto/src/cmp/ProtectedPkiMessage.cs2
2 files changed, 2 insertions, 2 deletions
diff --git a/crypto/src/cmp/CertificateStatus.cs b/crypto/src/cmp/CertificateStatus.cs
index e697f73bc..53227d062 100644
--- a/crypto/src/cmp/CertificateStatus.cs
+++ b/crypto/src/cmp/CertificateStatus.cs
@@ -36,7 +36,7 @@ namespace Org.BouncyCastle.Cmp
 
             byte[] digest = DigestUtilities.CalculateDigest(digAlg.Algorithm, cert.GetEncoded());
 
-            return Arrays.ConstantTimeAreEqual(certStatus.CertHash.GetOctets(), digest);
+            return Arrays.FixedTimeEquals(certStatus.CertHash.GetOctets(), digest);
         }
     }
 }
diff --git a/crypto/src/cmp/ProtectedPkiMessage.cs b/crypto/src/cmp/ProtectedPkiMessage.cs
index 6304b5200..8c9a4b152 100644
--- a/crypto/src/cmp/ProtectedPkiMessage.cs
+++ b/crypto/src/cmp/ProtectedPkiMessage.cs
@@ -116,7 +116,7 @@ namespace Org.BouncyCastle.Cmp
 
             IBlockResult result = Process(pkMacBuilder.Build(password).CreateCalculator());
 
-            return Arrays.ConstantTimeAreEqual(result.Collect(), m_pkiMessage.Protection.GetBytes());
+            return Arrays.FixedTimeEquals(result.Collect(), m_pkiMessage.Protection.GetBytes());
         }
 
         private TResult Process<TResult>(IStreamCalculator<TResult> streamCalculator)