CFx SDK Documentation  2023 SP0
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_
#define TOOLKIT_EXPORT
Definition: DbExport.h:40
OdSmartPtr< OdPwdIterator > OdPwdIteratorPtr
Definition: DbSecurity.h:209
@ SECURITYPARAMS_ENCRYPT_PROPS
Definition: DbSecurity.h:40
@ SECURITYPARAMS_UNSIGN_DATA
Definition: DbSecurity.h:45
@ SECURITYPARAMS_ALGID_RC4
Definition: DbSecurity.h:48
@ SECURITYPARAMS_SIGN_DATA
Definition: DbSecurity.h:42
@ SECURITYPARAMS_ADD_TIMESTAMP
Definition: DbSecurity.h:43
@ SECURITYPARAMS_ENCRYPT_DATA
Definition: DbSecurity.h:39
OdSmartPtr< OdPwdCache > OdPwdCachePtr
Definition: DbSecurity.h:234
OdSmartPtr< OdDbCrypt > OdDbCryptPtr
Definition: DbSecurity.h:180
OdString OdPassword
Definition: DbSecurity.h:52
unsigned int OdUInt32
unsigned char OdUInt8
virtual bool signData(const OdSecurityParams &securityParams, OdBinaryData &signatureBlock)=0
ODRX_DECLARE_MEMBERS(OdDbCrypt)
virtual bool decryptData(OdUInt8 *buffer, OdUInt32 bufferSize)=0
virtual bool digitalSignatureModeLaunched()
virtual bool initialize(const OdSecurityParams &securityParams)=0
virtual void appendDataToProcessSignature(const OdBinaryData &dataBlock)=0
virtual bool encryptData(OdUInt8 *buffer, OdUInt32 bufferSize)=0
virtual void verifyDataSignature(const OdBinaryData &signatureBlock, OdCryptoServices::OdSignatureVerificationResult &verificationResult, OdSignatureDescription &signatureDesc)=0
virtual OdPwdIteratorPtr newIterator()=0
virtual void add(const OdPassword &password)=0
virtual void get(OdPassword &password) const =0
virtual bool done() const =0
virtual void next()=0
OdString sCertIssuer
Definition: DbSecurity.h:78
OdUInt32 nFlags
Definition: DbSecurity.h:70
OdUInt32 nAlgId
Definition: DbSecurity.h:74
OdString sCertSerialNum
Definition: DbSecurity.h:79
OdString sTimeServer
Definition: DbSecurity.h:81
OdUInt32 nProvType
Definition: DbSecurity.h:72
OdString provName
Definition: DbSecurity.h:73
OdString sComment
Definition: DbSecurity.h:80
OdPassword password
Definition: DbSecurity.h:71
OdString sCertSubject
Definition: DbSecurity.h:77
OdUInt32 nKeyLength
Definition: DbSecurity.h:75
OdString m_timeServiceUsed
Definition: DbSecurity.h:91
OdString m_signatureDateAndTime
Definition: DbSecurity.h:90
GLuint buffer
Definition: gles2_ext.h:178