CryptoFramework
ICertificate.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include <string>
4 #include "cryptofw/Blob.hpp"
5 #include "cryptofw/CadesType.hpp"
6 
14 class ICertificate {
15 public:
21  virtual ~ICertificate() = default;
22 
31  virtual Blob Encrypt(const Blob& data) const = 0;
32 
41  virtual Blob Decrypt(const Blob& encrypted_data) const = 0;
42 
57  virtual Blob SignCades(const Blob& data, CadesType type, bool detached, const std::wstring& tsp_server_url = L"") const = 0;
58 
66  virtual std::string GetSubjectName() const = 0;
67 };
std::vector< std::uint8_t > Blob
Represents a binary data container.
Definition: Blob.hpp:13
CadesType
Enum representing different types of CAdES (CMS Advanced Electronic Signatures).
Definition: CadesType.hpp:9
Interface representing a digital certificate.
Definition: ICertificate.hpp:14
virtual std::string GetSubjectName() const =0
Retrieves the subject name of the certificate.
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.
virtual Blob Decrypt(const Blob &encrypted_data) const =0
Decrypts the provided encrypted data.
virtual ~ICertificate()=default
Virtual destructor for the ICertificate interface.
virtual Blob Encrypt(const Blob &data) const =0
Encrypts the provided data.