EU.Europa.EC.Markt.Dss.DigestAlgorithm.Equals C# (CSharp) Method

Equals() public method

public Equals ( object obj ) : bool
obj object
return bool
        public override bool Equals(object obj)
        {
            if (this == obj)
            {
                return true;
            }
            if (obj == null)
            {
                return false;
            }
            if (!(obj is EU.Europa.EC.Markt.Dss.DigestAlgorithm))
            {
                return false;
            }
            EU.Europa.EC.Markt.Dss.DigestAlgorithm other = (EU.Europa.EC.Markt.Dss.DigestAlgorithm
                )obj;
            if (name == null)
            {
                if (other.name != null)
                {
                    return false;
                }
            }
            else
            {
                if (!name.Equals(other.name))
                {
                    return false;
                }
            }
            return true;
        }
    }

Usage Example

Exemplo n.º 1
0
 //public string GetJavaSignatureAlgorithm(DigestAlgorithm algorithm)
 public string GetSignatureAlgorithm(DigestAlgorithm algorithm)
 {
     //jbonilla: cambio de enum a clase.
     if (this.Equals(SignatureAlgorithm.RSA))
     {
         if (algorithm.Equals(DigestAlgorithm.SHA1))
         {
             return "SHA1withRSA";
         }
         else
         {
             if (algorithm.Equals(DigestAlgorithm.SHA256))
             {
                 return "SHA256withRSA";
             }
             else
             {
                 if (algorithm.Equals(DigestAlgorithm.SHA256))
                 {
                     return "SHA512withRSA";
                 }
             }
         }
     }
     else
     {
         if (this.Equals(SignatureAlgorithm.ECDSA))
         {
             if (algorithm.Equals(DigestAlgorithm.SHA1))
             {
                 return "SHA1withECDSA";
             }
             else
             {
                 if (algorithm.Equals(DigestAlgorithm.SHA256))
                 {
                     return "SHA256withECDSA";
                 }
                 else
                 {
                     if (algorithm.Equals(DigestAlgorithm.SHA256))
                     {
                         return "SHA512withECDSA";
                     }
                 }
             }
         }
     }
     throw new NotSupportedException();
 }
All Usage Examples Of EU.Europa.EC.Markt.Dss.DigestAlgorithm::Equals