---
title: "System::Security::Cryptography::X509Certificates::X509Certificate::GetCertHashString method"
url: "https://reference.aspose.com/pub/cpp/system.security.cryptography.x509certificates/x509certificate/getcerthashstring/"
product: "Aspose.PUB for C++"
description: "System::Security::Cryptography::X509Certificates::X509Certificate::GetCertHashString method. Gets SHA1 hash for the current object as a hexadecimal string in C++."
---

## X509Certificate::GetCertHashString() const method


Gets [SHA1](../../../system.security.cryptography/sha1/) hash for the current object as a hexadecimal string.

```cpp
virtual String System::Security::Cryptography::X509Certificates::X509Certificate::GetCertHashString() const
```


### ReturnValue

The hexadecimal string.

## See Also

* Class [String](../../../system/string/)
* Class [X509Certificate](../)
* Namespace [System::Security::Cryptography::X509Certificates](../../)
* Library [Aspose.PUB for C++](../../../)
## X509Certificate::GetCertHashString(const HashAlgorithmName\&) const method


Gets [SHA1](../../../system.security.cryptography/sha1/) hash for the current object as a hexadecimal string.

```cpp
virtual String System::Security::Cryptography::X509Certificates::X509Certificate::GetCertHashString(const HashAlgorithmName &hash_algorithm) const
```


| Parameter | Type | Description |
| --- | --- | --- |
| hash_algorithm | const HashAlgorithmName\& | Hash algorithm name. |

### ReturnValue

The hexadecimal string.

## See Also

* Class [String](../../../system/string/)
* Class [X509Certificate](../)
* Namespace [System::Security::Cryptography::X509Certificates](../../)
* Library [Aspose.PUB for C++](../../../)
