CryptoFramework
ICsp.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include <vector>
4 #include <memory>
5 
6 #include "cryptofw/Blob.hpp"
7 #include "cryptofw/CadesType.hpp"
8 
9 class ICertificate;
10 
18 class ICsp {
19 public:
25  virtual ~ICsp() = default;
26 
34  virtual std::vector<std::shared_ptr<ICertificate>> GetCertificates() = 0;
35 
45  virtual bool VerifyCadesAttached(const Blob& signature, CadesType type) const = 0;
46 
57  virtual bool VerifyCadesDetached(const Blob& signature, const Blob& source, CadesType type) const = 0;
58 };
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
Interface for cryptographic service providers (CSPs).
Definition: ICsp.hpp:18
virtual std::vector< std::shared_ptr< ICertificate > > GetCertificates()=0
Retrieves a list of available certificates.
virtual bool VerifyCadesDetached(const Blob &signature, const Blob &source, CadesType type) const =0
Verifies a detached CAdES (CMS Advanced Electronic Signatures) signature.
virtual bool VerifyCadesAttached(const Blob &signature, CadesType type) const =0
Verifies an attached CAdES (CMS Advanced Electronic Signatures) signature.
virtual ~ICsp()=default
Virtual destructor for the ICsp interface.