summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2022-04-20 19:17:55 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2022-04-20 19:17:55 +0700
commit4deabbaef49424b504bdf7c7a284657609e8f175 (patch)
tree650223b9b644254bef9f373db695ee1532d0d919
parentNo HMacDsaKCalculator for verification (diff)
downloadBouncyCastle.NET-ed25519-4deabbaef49424b504bdf7c7a284657609e8f175.tar.xz
Consistent naming
-rw-r--r--crypto/src/tls/crypto/TlsVerifier.cs6
-rw-r--r--crypto/src/tls/crypto/impl/bc/BcTlsDssVerifier.cs6
-rw-r--r--crypto/src/tls/crypto/impl/bc/BcTlsECDsa13Verifier.cs6
-rw-r--r--crypto/src/tls/crypto/impl/bc/BcTlsEd25519Verifier.cs8
-rw-r--r--crypto/src/tls/crypto/impl/bc/BcTlsEd448Verifier.cs8
-rw-r--r--crypto/src/tls/crypto/impl/bc/BcTlsRsaPssVerifier.cs8
-rw-r--r--crypto/src/tls/crypto/impl/bc/BcTlsRsaVerifier.cs6
-rw-r--r--crypto/src/tls/crypto/impl/bc/BcTlsVerifier.cs4
8 files changed, 26 insertions, 26 deletions
diff --git a/crypto/src/tls/crypto/TlsVerifier.cs b/crypto/src/tls/crypto/TlsVerifier.cs
index ad2ddbc84..1e6e726d9 100644
--- a/crypto/src/tls/crypto/TlsVerifier.cs
+++ b/crypto/src/tls/crypto/TlsVerifier.cs
@@ -8,13 +8,13 @@ namespace Org.BouncyCastle.Tls.Crypto
     public interface TlsVerifier
     {
         /// <exception cref="IOException"/>
-        TlsStreamVerifier GetStreamVerifier(DigitallySigned signature);
+        TlsStreamVerifier GetStreamVerifier(DigitallySigned digitallySigned);
 
         /// <summary>Return true if the passed in signature and hash represent a real signature.</summary>
-        /// <param name="signature">the signature object containing the signature to be verified.</param>
+        /// <param name="digitallySigned">the signature object containing the signature to be verified.</param>
         /// <param name="hash">the hash calculated for the signature.</param>
         /// <returns>true if signature verifies, false otherwise.</returns>
         /// <exception cref="IOException">in case of an exception verifying signature.</exception>
-        bool VerifyRawSignature(DigitallySigned signature, byte[] hash);
+        bool VerifyRawSignature(DigitallySigned digitallySigned, byte[] hash);
     }
 }
diff --git a/crypto/src/tls/crypto/impl/bc/BcTlsDssVerifier.cs b/crypto/src/tls/crypto/impl/bc/BcTlsDssVerifier.cs
index 01f9265cc..3781069f7 100644
--- a/crypto/src/tls/crypto/impl/bc/BcTlsDssVerifier.cs
+++ b/crypto/src/tls/crypto/impl/bc/BcTlsDssVerifier.cs
@@ -20,9 +20,9 @@ namespace Org.BouncyCastle.Tls.Crypto.Impl.BC
 
         protected abstract short SignatureAlgorithm { get; }
 
-        public override bool VerifyRawSignature(DigitallySigned signedParams, byte[] hash)
+        public override bool VerifyRawSignature(DigitallySigned digitallySigned, byte[] hash)
         {
-            SignatureAndHashAlgorithm algorithm = signedParams.Algorithm;
+            SignatureAndHashAlgorithm algorithm = digitallySigned.Algorithm;
             if (algorithm != null && algorithm.Signature != SignatureAlgorithm)
                 throw new InvalidOperationException("Invalid algorithm: " + algorithm);
 
@@ -37,7 +37,7 @@ namespace Org.BouncyCastle.Tls.Crypto.Impl.BC
             {
                 signer.BlockUpdate(hash, 0, hash.Length);
             }
-            return signer.VerifySignature(signedParams.Signature);
+            return signer.VerifySignature(digitallySigned.Signature);
         }
     }
 }
diff --git a/crypto/src/tls/crypto/impl/bc/BcTlsECDsa13Verifier.cs b/crypto/src/tls/crypto/impl/bc/BcTlsECDsa13Verifier.cs
index 8a45c23ad..159b17c0b 100644
--- a/crypto/src/tls/crypto/impl/bc/BcTlsECDsa13Verifier.cs
+++ b/crypto/src/tls/crypto/impl/bc/BcTlsECDsa13Verifier.cs
@@ -23,9 +23,9 @@ namespace Org.BouncyCastle.Tls.Crypto.Impl.BC
             this.m_signatureScheme = signatureScheme;
         }
 
-        public override bool VerifyRawSignature(DigitallySigned signature, byte[] hash)
+        public override bool VerifyRawSignature(DigitallySigned digitallySigned, byte[] hash)
         {
-            SignatureAndHashAlgorithm algorithm = signature.Algorithm;
+            SignatureAndHashAlgorithm algorithm = digitallySigned.Algorithm;
             if (algorithm == null || SignatureScheme.From(algorithm) != m_signatureScheme)
                 throw new InvalidOperationException("Invalid algorithm: " + algorithm);
 
@@ -34,7 +34,7 @@ namespace Org.BouncyCastle.Tls.Crypto.Impl.BC
             ISigner signer = new DsaDigestSigner(dsa, new NullDigest());
             signer.Init(false, m_publicKey);
             signer.BlockUpdate(hash, 0, hash.Length);
-            return signer.VerifySignature(signature.Signature);
+            return signer.VerifySignature(digitallySigned.Signature);
         }
     }
 }
diff --git a/crypto/src/tls/crypto/impl/bc/BcTlsEd25519Verifier.cs b/crypto/src/tls/crypto/impl/bc/BcTlsEd25519Verifier.cs
index fb91442d9..238c04ab7 100644
--- a/crypto/src/tls/crypto/impl/bc/BcTlsEd25519Verifier.cs
+++ b/crypto/src/tls/crypto/impl/bc/BcTlsEd25519Verifier.cs
@@ -13,21 +13,21 @@ namespace Org.BouncyCastle.Tls.Crypto.Impl.BC
         {
         }
 
-        public override bool VerifyRawSignature(DigitallySigned signature, byte[] hash)
+        public override bool VerifyRawSignature(DigitallySigned digitallySigned, byte[] hash)
         {
             throw new NotSupportedException();
         }
 
-        public override TlsStreamVerifier GetStreamVerifier(DigitallySigned signature)
+        public override TlsStreamVerifier GetStreamVerifier(DigitallySigned digitallySigned)
         {
-            SignatureAndHashAlgorithm algorithm = signature.Algorithm;
+            SignatureAndHashAlgorithm algorithm = digitallySigned.Algorithm;
             if (algorithm == null || SignatureScheme.From(algorithm) != SignatureScheme.ed25519)
                 throw new InvalidOperationException("Invalid algorithm: " + algorithm);
 
             Ed25519Signer verifier = new Ed25519Signer();
             verifier.Init(false, m_publicKey);
 
-            return new BcTlsStreamVerifier(verifier, signature.Signature);
+            return new BcTlsStreamVerifier(verifier, digitallySigned.Signature);
         }
     }
 }
diff --git a/crypto/src/tls/crypto/impl/bc/BcTlsEd448Verifier.cs b/crypto/src/tls/crypto/impl/bc/BcTlsEd448Verifier.cs
index 4492fdd60..3634eeaa7 100644
--- a/crypto/src/tls/crypto/impl/bc/BcTlsEd448Verifier.cs
+++ b/crypto/src/tls/crypto/impl/bc/BcTlsEd448Verifier.cs
@@ -13,21 +13,21 @@ namespace Org.BouncyCastle.Tls.Crypto.Impl.BC
         {
         }
 
-        public override bool VerifyRawSignature(DigitallySigned signature, byte[] hash)
+        public override bool VerifyRawSignature(DigitallySigned digitallySigned, byte[] hash)
         {
             throw new NotSupportedException();
         }
 
-        public override TlsStreamVerifier GetStreamVerifier(DigitallySigned signature)
+        public override TlsStreamVerifier GetStreamVerifier(DigitallySigned digitallySigned)
         {
-            SignatureAndHashAlgorithm algorithm = signature.Algorithm;
+            SignatureAndHashAlgorithm algorithm = digitallySigned.Algorithm;
             if (algorithm == null || SignatureScheme.From(algorithm) != SignatureScheme.ed448)
                 throw new InvalidOperationException("Invalid algorithm: " + algorithm);
 
             Ed448Signer verifier = new Ed448Signer(TlsUtilities.EmptyBytes);
             verifier.Init(false, m_publicKey);
 
-            return new BcTlsStreamVerifier(verifier, signature.Signature);
+            return new BcTlsStreamVerifier(verifier, digitallySigned.Signature);
         }
     }
 }
diff --git a/crypto/src/tls/crypto/impl/bc/BcTlsRsaPssVerifier.cs b/crypto/src/tls/crypto/impl/bc/BcTlsRsaPssVerifier.cs
index 1b14d1ab4..4f5ca79d8 100644
--- a/crypto/src/tls/crypto/impl/bc/BcTlsRsaPssVerifier.cs
+++ b/crypto/src/tls/crypto/impl/bc/BcTlsRsaPssVerifier.cs
@@ -22,14 +22,14 @@ namespace Org.BouncyCastle.Tls.Crypto.Impl.BC
             this.m_signatureScheme = signatureScheme;
         }
 
-        public override bool VerifyRawSignature(DigitallySigned signature, byte[] hash)
+        public override bool VerifyRawSignature(DigitallySigned digitallySigned, byte[] hash)
         {
             throw new NotSupportedException();
         }
 
-        public override TlsStreamVerifier GetStreamVerifier(DigitallySigned signature)
+        public override TlsStreamVerifier GetStreamVerifier(DigitallySigned digitallySigned)
         {
-            SignatureAndHashAlgorithm algorithm = signature.Algorithm;
+            SignatureAndHashAlgorithm algorithm = digitallySigned.Algorithm;
             if (algorithm == null || SignatureScheme.From(algorithm) != m_signatureScheme)
                 throw new InvalidOperationException("Invalid algorithm: " + algorithm);
 
@@ -39,7 +39,7 @@ namespace Org.BouncyCastle.Tls.Crypto.Impl.BC
             PssSigner verifier = new PssSigner(new RsaEngine(), digest, digest.GetDigestSize());
             verifier.Init(false, m_publicKey);
 
-            return new BcTlsStreamVerifier(verifier, signature.Signature);
+            return new BcTlsStreamVerifier(verifier, digitallySigned.Signature);
         }
     }
 }
diff --git a/crypto/src/tls/crypto/impl/bc/BcTlsRsaVerifier.cs b/crypto/src/tls/crypto/impl/bc/BcTlsRsaVerifier.cs
index 41f1bb1be..33c7cfe20 100644
--- a/crypto/src/tls/crypto/impl/bc/BcTlsRsaVerifier.cs
+++ b/crypto/src/tls/crypto/impl/bc/BcTlsRsaVerifier.cs
@@ -19,11 +19,11 @@ namespace Org.BouncyCastle.Tls.Crypto.Impl.BC
         {
         }
 
-        public override bool VerifyRawSignature(DigitallySigned signedParams, byte[] hash)
+        public override bool VerifyRawSignature(DigitallySigned digitallySigned, byte[] hash)
         {
             IDigest nullDigest = new NullDigest();
 
-            SignatureAndHashAlgorithm algorithm = signedParams.Algorithm;
+            SignatureAndHashAlgorithm algorithm = digitallySigned.Algorithm;
             ISigner signer;
             if (algorithm != null)
             {
@@ -46,7 +46,7 @@ namespace Org.BouncyCastle.Tls.Crypto.Impl.BC
             }
             signer.Init(false, m_publicKey);
             signer.BlockUpdate(hash, 0, hash.Length);
-            return signer.VerifySignature(signedParams.Signature);
+            return signer.VerifySignature(digitallySigned.Signature);
         }
     }
 }
diff --git a/crypto/src/tls/crypto/impl/bc/BcTlsVerifier.cs b/crypto/src/tls/crypto/impl/bc/BcTlsVerifier.cs
index dc8d21d74..4db2c8f53 100644
--- a/crypto/src/tls/crypto/impl/bc/BcTlsVerifier.cs
+++ b/crypto/src/tls/crypto/impl/bc/BcTlsVerifier.cs
@@ -23,11 +23,11 @@ namespace Org.BouncyCastle.Tls.Crypto.Impl.BC
             this.m_publicKey = publicKey;
         }
 
-        public virtual TlsStreamVerifier GetStreamVerifier(DigitallySigned signature)
+        public virtual TlsStreamVerifier GetStreamVerifier(DigitallySigned digitallySigned)
         {
             return null;
         }
 
-        public abstract bool VerifyRawSignature(DigitallySigned signature, byte[] hash);
+        public abstract bool VerifyRawSignature(DigitallySigned digitallySigned, byte[] hash);
     }
 }