CFx SDK Documentation  2020SP3
DbSecurity.h
Go to the documentation of this file.
1 // Copyright (C) 2002-2017, Open Design Alliance (the "Alliance").
3 // All rights reserved.
4 //
5 // This software and its documentation and related materials are owned by
6 // the Alliance. The software may only be incorporated into application
7 // programs owned by members of the Alliance, subject to a signed
8 // Membership Agreement and Supplemental Software License Agreement with the
9 // Alliance. The structure and organization of this software are the valuable
10 // trade secrets of the Alliance and its suppliers. The software is also
11 // protected by copyright law and international treaty provisions. Application
12 // programs incorporating this software must include the following statement
13 // with their copyright notices:
14 //
15 // This application incorporates Teigha(R) software pursuant to a license
16 // agreement with Open Design Alliance.
17 // Teigha(R) Copyright (C) 2002-2017 by Open Design Alliance.
18 // All rights reserved.
19 //
20 // By use of this software, its documentation or related materials, you
21 // acknowledge and accept the above terms.
23 
24 #ifndef _ODDBSECURITY_INCLUDED_
25 #define _ODDBSECURITY_INCLUDED_
26 
27 #include "TD_PackPush.h"
28 
29 #include "RxObject.h"
30 #include "OdArray.h"
31 #include "DbExport.h"
32 #include "OdString.h"
33 #include "OdBinaryData.h"
34 
36 
37 enum
38 {
41 
44  //FELIX_CHANGE_BEGIN: To support Remove Sign functionality
46  //FELIX_CHANGE_END
47 
48  SECURITYPARAMS_ALGID_RC4 = 0x00006801
49 };
50 
51 
53 
61 {
62 public:
64  : nFlags(0)
65  , nProvType(0)
67  , nKeyLength(40)
68  {}
69 
76 
82 };
83 
88 {
89 public:
92 
94 };
95 
104 {
105 public:
107 
114  virtual bool initialize(const OdSecurityParams& securityParams) = 0;
123  virtual bool encryptData(OdUInt8* buffer, OdUInt32 bufferSize) = 0;
124 
133  virtual bool decryptData(OdUInt8* buffer, OdUInt32 bufferSize) = 0;
134 
142 
150  virtual void appendDataToProcessSignature(const OdBinaryData& dataBlock) = 0;
151 
163  virtual bool signData(const OdSecurityParams& securityParams, OdBinaryData& signatureBlock) = 0;
164 
172  virtual void verifyDataSignature(const OdBinaryData& signatureBlock,
174  OdSignatureDescription& signatureDesc) = 0;
175 };
176 
181 
188 {
189 public:
193  virtual bool done() const = 0;
197  virtual void next() = 0;
203  virtual void get(OdPassword& password) const = 0;
204 };
205 
210 
216 {
217 public:
223  virtual void add(const OdPassword& password) = 0;
229 };
230 
235 
236 #include "TD_PackPop.h"
237 
238 #endif // _ODDBSECURITY_INCLUDED_
OdSecurityParams::sComment
OdString sComment
Definition: DbSecurity.h:80
DbExport.h
OdPwdCache::add
virtual void add(const OdPassword &password)=0
OdDbCrypt::verifyDataSignature
virtual void verifyDataSignature(const OdBinaryData &signatureBlock, OdCryptoServices::OdSignatureVerificationResult &verificationResult, OdSignatureDescription &signatureDesc)=0
OdString
Definition: OdString.h:95
OdCryptoServices.h
OdSecurityParams::password
OdPassword password
Definition: DbSecurity.h:71
OdUInt8
unsigned char OdUInt8
Definition: OdPlatformSettings.h:759
OdPwdIterator
Definition: DbSecurity.h:188
OdPassword
OdString OdPassword
Definition: DbSecurity.h:52
buffer
GLuint buffer
Definition: gles2_ext.h:178
OdSignatureDescription::m_comment
OdString m_comment
Definition: DbSecurity.h:93
OdBinaryData
Definition: OdBinaryData.h:42
OdRxObject
Definition: RxObject.h:564
OdCryptoServices::OdSignatureVerificationResult
OdSignatureVerificationResult
Definition: OdCryptoServices.h:110
OdDbCrypt::ODRX_DECLARE_MEMBERS
ODRX_DECLARE_MEMBERS(OdDbCrypt)
OdSecurityParams::sCertSerialNum
OdString sCertSerialNum
Definition: DbSecurity.h:79
TD_PackPop.h
OdSignatureBaseDescription
Definition: OdCryptoServices.h:93
SECURITYPARAMS_ADD_TIMESTAMP
@ SECURITYPARAMS_ADD_TIMESTAMP
Definition: DbSecurity.h:43
OdDbCrypt::initialize
virtual bool initialize(const OdSecurityParams &securityParams)=0
RxObject.h
OdSignatureDescription::m_signatureDateAndTime
OdString m_signatureDateAndTime
Definition: DbSecurity.h:90
OdUInt32
unsigned int OdUInt32
Definition: OdPlatformSettings.h:783
OdSecurityParams::sCertIssuer
OdString sCertIssuer
Definition: DbSecurity.h:78
OdPwdIteratorPtr
OdSmartPtr< OdPwdIterator > OdPwdIteratorPtr
Definition: DbSecurity.h:209
OdSignatureDescription
Definition: DbSecurity.h:88
OdDbCrypt::signData
virtual bool signData(const OdSecurityParams &securityParams, OdBinaryData &signatureBlock)=0
OdPwdIterator::get
virtual void get(OdPassword &password) const =0
OdSignatureDescription::m_timeServiceUsed
OdString m_timeServiceUsed
Definition: DbSecurity.h:91
OdBinaryData.h
OdSecurityParams::OdSecurityParams
OdSecurityParams()
Definition: DbSecurity.h:63
OdString.h
OdArray.h
OdSmartPtr
Definition: SmartPtr.h:58
SECURITYPARAMS_ALGID_RC4
@ SECURITYPARAMS_ALGID_RC4
Definition: DbSecurity.h:48
SECURITYPARAMS_ENCRYPT_DATA
@ SECURITYPARAMS_ENCRYPT_DATA
Definition: DbSecurity.h:39
OdSecurityParams::sCertSubject
OdString sCertSubject
Definition: DbSecurity.h:77
OdPwdCachePtr
OdSmartPtr< OdPwdCache > OdPwdCachePtr
Definition: DbSecurity.h:234
OdDbCrypt::appendDataToProcessSignature
virtual void appendDataToProcessSignature(const OdBinaryData &dataBlock)=0
SECURITYPARAMS_ENCRYPT_PROPS
@ SECURITYPARAMS_ENCRYPT_PROPS
Definition: DbSecurity.h:40
OdPwdCache
Definition: DbSecurity.h:216
OdSecurityParams::provName
OdString provName
Definition: DbSecurity.h:73
TD_PackPush.h
OdSecurityParams::nFlags
OdUInt32 nFlags
Definition: DbSecurity.h:70
OdSecurityParams::nAlgId
OdUInt32 nAlgId
Definition: DbSecurity.h:74
OdDbCrypt::encryptData
virtual bool encryptData(OdUInt8 *buffer, OdUInt32 bufferSize)=0
OdSecurityParams
Definition: DbSecurity.h:61
OdDbCrypt::digitalSignatureModeLaunched
virtual bool digitalSignatureModeLaunched()
OdDbCrypt
Definition: DbSecurity.h:104
OdSecurityParams::nProvType
OdUInt32 nProvType
Definition: DbSecurity.h:72
OdPwdIterator::done
virtual bool done() const =0
OdDbCryptPtr
OdSmartPtr< OdDbCrypt > OdDbCryptPtr
Definition: DbSecurity.h:180
OdSecurityParams::sTimeServer
OdString sTimeServer
Definition: DbSecurity.h:81
TOOLKIT_EXPORT
#define TOOLKIT_EXPORT
Definition: DbExport.h:40
SECURITYPARAMS_UNSIGN_DATA
@ SECURITYPARAMS_UNSIGN_DATA
Definition: DbSecurity.h:45
OdPwdIterator::next
virtual void next()=0
OdSecurityParams::nKeyLength
OdUInt32 nKeyLength
Definition: DbSecurity.h:75
SECURITYPARAMS_SIGN_DATA
@ SECURITYPARAMS_SIGN_DATA
Definition: DbSecurity.h:42
OdDbCrypt::decryptData
virtual bool decryptData(OdUInt8 *buffer, OdUInt32 bufferSize)=0
OdPwdCache::newIterator
virtual OdPwdIteratorPtr newIterator()=0