/// <summary>Returns a value that indicates whether the key identifier for this instance is equivalent to the specified X.509 certificate.</summary>
 /// <param name="certificate">An <see cref="T:System.Security.Cryptography.X509Certificates.X509Certificate2" /> that contains the X.509 certificate to compare.</param>
 /// <returns>
 /// <see langword="true" /> if <paramref name="certificate" /> has the raw data that matches the current instance; otherwise, <see langword="false" />.</returns>
 /// <exception cref="T:System.ArgumentNullException">
 /// <paramref name="certificate" /> is <see langword="null" />.</exception>
 public bool Matches(X509Certificate2 certificate)
 {
     if (certificate == null)
     {
         return(false);
     }
     return(this.Matches(X509RawDataKeyIdentifierClause.GetRawData((X509Certificate)certificate)));
 }
 /// <summary>Initializes a new instance of the <see cref="T:System.IdentityModel.Tokens.X509RawDataKeyIdentifierClause" /> class using the specified X.509 certificate. </summary>
 /// <param name="certificate">An <see cref="T:System.Security.Cryptography.X509Certificates.X509Certificate2" /> that contains the X.509 certificate.</param>
 /// <exception cref="T:System.ArgumentNullException">
 /// <paramref name="certificate" /> is <see langword="null" />.</exception>
 public X509RawDataKeyIdentifierClause(X509Certificate2 certificate)
     : this(X509RawDataKeyIdentifierClause.GetRawData((X509Certificate)certificate), false)
 {
     this.certificate = certificate;
 }