CFx SDK Documentation  2023 SP0
Public Member Functions | List of all members
OdDbCrypt Class Referenceabstract

#include <DbSecurity.h>

Inheritance diagram for OdDbCrypt:
OdRxObject

Public Member Functions

 ODRX_DECLARE_MEMBERS (OdDbCrypt)
 
virtual bool initialize (const OdSecurityParams &securityParams)=0
 
virtual bool encryptData (OdUInt8 *buffer, OdUInt32 bufferSize)=0
 
virtual bool decryptData (OdUInt8 *buffer, OdUInt32 bufferSize)=0
 
virtual bool digitalSignatureModeLaunched ()
 
virtual void appendDataToProcessSignature (const OdBinaryData &dataBlock)=0
 
virtual bool signData (const OdSecurityParams &securityParams, OdBinaryData &signatureBlock)=0
 
virtual void verifyDataSignature (const OdBinaryData &signatureBlock, OdCryptoServices::OdSignatureVerificationResult &verificationResult, OdSignatureDescription &signatureDesc)=0
 
- Public Member Functions inherited from OdRxObject
 ODRX_HEAP_OPERATORS ()
 
 OdRxObject ()
 
virtual ~OdRxObject ()
 
virtual OdRxObjectqueryX (const OdRxClass *pClass) const
 
virtual OdRxObjectx (const OdRxClass *pClass) const
 
virtual OdRxClassisA () const
 
virtual void addRef ()=0
 
virtual void release ()=0
 
virtual long numRefs () const
 
bool isKindOf (const OdRxClass *pClass) const
 
virtual OdRxObjectPtr clone () const
 
virtual void copyFrom (const OdRxObject *pSource)
 
virtual OdRx::Ordering comparedTo (const OdRxObject *pOther) const
 
virtual bool isEqualTo (const OdRxObject *pOther) const
 

Additional Inherited Members

- Static Public Member Functions inherited from OdRxObject
static OdRxObjectPtr cast (const OdRxObject *pointer)
 
static OdRxClassdesc ()
 

Detailed Description

This class defines the interface for the encription/decription of byte data.

Corresponding C++ library: TD_Db <group Other_Classes>

Definition at line 103 of file DbSecurity.h.

Member Function Documentation

◆ appendDataToProcessSignature()

virtual void OdDbCrypt::appendDataToProcessSignature ( const OdBinaryData dataBlock)
pure virtual

Appends a data block to be signed/hashed. This method should be used to specify the data to be processed by signData() or verifyDataSignature().

Parameters
dataBlock[in] Data block to be signed/hashed.

◆ decryptData()

virtual bool OdDbCrypt::decryptData ( OdUInt8 buffer,
OdUInt32  bufferSize 
)
pure virtual

Decrypts the specified buffer.

Parameters
bufferSize[in] Number of bytes.
buffer[in/out] Data to be decrypted.
Returns
Returns true if and only if successful.

◆ digitalSignatureModeLaunched()

virtual bool OdDbCrypt::digitalSignatureModeLaunched ( )
virtual
Returns
Returns true if and only if trusted certificate was found during OdCrypt initialization. It means the signing is possible using the certificate specified by OdSecurityParams. The default implementation returns false. You should override this method when implementing the interface.

◆ encryptData()

virtual bool OdDbCrypt::encryptData ( OdUInt8 buffer,
OdUInt32  bufferSize 
)
pure virtual

Encrypts the specified buffer.

Parameters
bufferSize[in] Number of bytes.
buffer[in/out] Data to be encrypted.
Returns
Returns true if and only if successful.

◆ initialize()

virtual bool OdDbCrypt::initialize ( const OdSecurityParams securityParams)
pure virtual

Initializes this OdCrypt object with the specified security parameters.

Parameters
securityParams[in] Security parameters.
Returns
Returns true if and only if successful.

◆ ODRX_DECLARE_MEMBERS()

OdDbCrypt::ODRX_DECLARE_MEMBERS ( OdDbCrypt  )

◆ signData()

virtual bool OdDbCrypt::signData ( const OdSecurityParams securityParams,
OdBinaryData signatureBlock 
)
pure virtual

Creates a hash of the data blocks appended by appendDataToProcessSignature() method, signs the hash and returns the signed hash (detached signature).

Parameters
securityParams[in] Certificate and signature settings.
signatureBlock[out] Signed hash.
Returns
Returns true if the function succeeds. If the function fails, the return value is false.

◆ verifyDataSignature()

virtual void OdDbCrypt::verifyDataSignature ( const OdBinaryData signatureBlock,
OdCryptoServices::OdSignatureVerificationResult verificationResult,
OdSignatureDescription signatureDesc 
)
pure virtual

Verifies a detached signature using data blocks appended by appendDataToProcessSignature() method.

Parameters
signatureBlock[in] Detached signature.
verificationResultMessage[out] Verification result message.
pSignDesc[out] A pointer to preallocated structure into which signature description data will be placed.

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