CryptoFramework
Public Member Functions | List of all members
ICsp Class Referenceabstract

Interface for cryptographic service providers (CSPs). More...

#include <ICsp.hpp>

Public Member Functions

virtual ~ICsp ()=default
 Virtual destructor for the ICsp interface. More...
 
virtual std::vector< std::shared_ptr< ICertificate > > GetCertificates ()=0
 Retrieves a list of available certificates. More...
 
virtual bool VerifyCadesAttached (const Blob &signature, CadesType type) const =0
 Verifies an attached CAdES (CMS Advanced Electronic Signatures) signature. More...
 
virtual bool VerifyCadesDetached (const Blob &signature, const Blob &source, CadesType type) const =0
 Verifies a detached CAdES (CMS Advanced Electronic Signatures) signature. More...
 

Detailed Description

Interface for cryptographic service providers (CSPs).

The ICsp interface defines the methods required for managing certificates and verifying digital signatures. Derived classes should implement these methods based on specific cryptographic service providers.

Constructor & Destructor Documentation

◆ ~ICsp()

virtual ICsp::~ICsp ( )
virtualdefault

Virtual destructor for the ICsp interface.

Ensures proper cleanup of derived class objects through the interface.

Member Function Documentation

◆ GetCertificates()

virtual std::vector<std::shared_ptr<ICertificate> > ICsp::GetCertificates ( )
pure virtual

Retrieves a list of available certificates.

Provides access to the certificates managed by the cryptographic service provider.

Returns
A vector of shared pointers to all certificates that find by current CSP.

◆ VerifyCadesAttached()

virtual bool ICsp::VerifyCadesAttached ( const Blob signature,
CadesType  type 
) const
pure virtual

Verifies an attached CAdES (CMS Advanced Electronic Signatures) signature.

Validates the authenticity of the provided signature against its embedded data.

Parameters
signatureThe Blob containing the attached signature data.
typeThe type of CAdES signature (e.g., CadesType::kBes).
Returns
Returns true if the signature is valid, otherwise false.

◆ VerifyCadesDetached()

virtual bool ICsp::VerifyCadesDetached ( const Blob signature,
const Blob source,
CadesType  type 
) const
pure virtual

Verifies a detached CAdES (CMS Advanced Electronic Signatures) signature.

Validates the authenticity of the provided signature against external source data.

Parameters
signatureThe Blob containing the detached signature data.
sourceThe Blob containing the original source data.
typeThe type of CAdES signature (e.g., CadesType::kBes).
Returns
true if the signature is valid, otherwise false.

The documentation for this class was generated from the following file: