public virtual byte[] GetCertHash ()
{
#if NET_2_0
if (x509 == null)
throw new CryptographicException (Locale.GetText ("Certificate instance is empty."));
#endif
// we'll hash the cert only once and only if required
if ((cachedCertificateHash == null) && (x509 != null)) {
SHA1 sha = SHA1.Create ();
cachedCertificateHash = sha.ComputeHash (x509.RawData);
}
return cachedCertificateHash;
}