---
title: "System::Security::Cryptography::AsymmetricSignatureFormatter::SetKey method"
url: "https://reference.aspose.com/pdf/cpp/system.security.cryptography/asymmetricsignatureformatter/setkey/"
product: "Aspose.PDF for C++ API Reference"
description: "System::Security::Cryptography::AsymmetricSignatureFormatter::SetKey method. Sets asymmetric algorithm to use when calculating the signature in C++."
---

## AsymmetricSignatureFormatter::SetKey method


Sets asymmetric algorithm to use when calculating the signature.

```cpp
virtual void System::Security::Cryptography::AsymmetricSignatureFormatter::SetKey(System::SharedPtr<AsymmetricAlgorithm> key)=0
```


| Parameter | Type | Description |
| --- | --- | --- |
| key | System::SharedPtr\<AsymmetricAlgorithm\> | Algorithm to use. |

## See Also

* Typedef [SharedPtr](../../../system/sharedptr/)
* Class [AsymmetricAlgorithm](../../asymmetricalgorithm/)
* Class [AsymmetricSignatureFormatter](../)
* Namespace [System::Security::Cryptography](../../)
* Library [Aspose.PDF for C++](../../../)
