|
CryptoFramework
|
Interface representing a digital certificate. More...
#include <ICertificate.hpp>
Public Member Functions | |
| virtual | ~ICertificate ()=default |
Virtual destructor for the ICertificate interface. More... | |
| virtual Blob | Encrypt (const Blob &data) const =0 |
| Encrypts the provided data. More... | |
| virtual Blob | Decrypt (const Blob &encrypted_data) const =0 |
| Decrypts the provided encrypted data. More... | |
| virtual Blob | SignCades (const Blob &data, CadesType type, bool detached, const std::wstring &tsp_server_url=L"") const =0 |
| Signs the provided data using the CAdES format. More... | |
| virtual std::string | GetSubjectName () const =0 |
| Retrieves the subject name of the certificate. More... | |
Interface representing a digital certificate.
The ICertificate interface defines methods for encryption, decryption, signing data using CAdES (CMS Advanced Electronic Signatures), and retrieving certificate information.
|
virtualdefault |
Virtual destructor for the ICertificate interface.
Ensures proper cleanup of derived class objects through the interface.
Decrypts the provided encrypted data.
Decrypts the input Blob data using the certificate's private key.
| encrypted_data | The Blob containing the data to be decrypted. |
Blob. Encrypts the provided data.
Encrypts the input Blob data using the certificate's public key.
| data | The Blob containing the data to be encrypted. |
Blob.
|
pure virtual |
Retrieves the subject name of the certificate.
Returns the subject name (distinguished name) associated with the certificate.
|
pure virtual |
Signs the provided data using the CAdES format.
Generates a CAdES signature for the input data, with the option to create an attached or detached signature. Additionally, a Time-Stamp Protocol (TSP) server URL can be provided for timestamping the signature.
| data | The Blob containing the data to be signed. |
| type | The type of CAdES signature (e.g., CadesType::kBes). |
| detached | A boolean indicating whether the signature is detached (true) or attached (false). |
| tsp_server_url | An optional URL of the TSP server to include a trusted timestamp in the signature. If not provided, timestamping will not be performed. |
Blob.