BaseCipherSuitePlugin.SignatureAlgorithmDSA.SupportsHashAlgorithmType C# (CSharp) Method

SupportsHashAlgorithmType() public method

public SupportsHashAlgorithmType ( byte hashAlgorithm ) : bool
hashAlgorithm byte
return bool
        public override bool SupportsHashAlgorithmType(byte hashAlgorithm)
        {
            // Only HashAlgorithm.sha1 supported
            if (hashAlgorithm == 2) {
                return true;
            }

            return false;
        }

Usage Example

 public void Constructor()
 {
     SignatureAlgorithmDSA dsa = new SignatureAlgorithmDSA();
     Assert.AreEqual ("1.2.840.10040.4.1", dsa.CertificateKeyAlgorithm);
     Assert.AreEqual (2, dsa.SignatureAlgorithmType);
     Assert.IsTrue (dsa.SupportsProtocolVersion(ProtocolVersion.TLS1_0));
     Assert.IsFalse (dsa.SupportsHashAlgorithmType(1));
     Assert.IsTrue (dsa.SupportsHashAlgorithmType(2));
 }
All Usage Examples Of BaseCipherSuitePlugin.SignatureAlgorithmDSA::SupportsHashAlgorithmType