System.Security.Cryptography.X509Certificates.X509Certificate.X509Certificate.X509Certificate.GetCertHash C# (CSharp) Method

GetCertHash() public method

public GetCertHash ( ) : byte[]
return byte[]
		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;
		}