sipxportlib  Version 3.3
OsConfigEncryption.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2004-2006 SIPfoundry Inc.
3 // Licensed by SIPfoundry under the LGPL license.
4 //
5 // Copyright (C) 2004-2006 Pingtel Corp. All rights reserved.
6 // Licensed to SIPfoundry under a Contributor Agreement.
7 //
8 // $$
10 
11 
12 #ifndef _OsConfigEncryption_h_
13 #define _OsConfigEncryption_h_
14 
15 // SYSTEM INCLUDES
16 // APPLICATION INCLUDES
17 #include "os/OsDefs.h"
18 #include "os/OsEncryption.h"
19 
20 // DEFINES
21 // MACROS
22 // EXTERNAL FUNCTIONS
23 // EXTERNAL VARIABLES
24 // CONSTANTS
25 // STRUCTS
26 // TYPEDEFS
27 // FORWARD DECLARATIONS
28 class OsConfigDb; // for some reason, #include os/OsConfigDb was not working
29 
36 {
37 /* //////////////////////////// PUBLIC //////////////////////////////////// */
38 public:
40  virtual UtlBoolean isEncrypted(OsConfigDb *cfg, const char *buffer, int buffLen) = 0;
41 
43  virtual UtlBoolean isNormallyEncrypted(OsConfigDb *cfg) = 0;
44 
46  virtual OsStatus encrypt(OsConfigDb *cfg, OsEncryption *encryption, char *buffer, int buffLen) = 0;
47 
49  virtual OsStatus decrypt(OsConfigDb *cfg, OsEncryption *encryption, char *buffer, int buffLen) = 0;
50 
52  virtual UtlBoolean isWriteEncryptedEnabled() = 0;
53 
55  // virtual const unsigned char *getFileHeader(int& headerLen) = 0;
56 
57  virtual ~OsConfigEncryption(){};
58 };
59 
60 /* ============================ INLINE METHODS ============================ */
61 
62 #endif // _OsConfigEncryption_h_
63 
Wrapper and helper around system encryption routines.
Definition: OsEncryption.h:56
virtual UtlBoolean isEncrypted(OsConfigDb *cfg, const char *buffer, int buffLen)=0
Test a buffer if it's actually encrypted.
OsStatus
Definition: OsStatus.h:27
virtual UtlBoolean isNormallyEncrypted(OsConfigDb *cfg)=0
Is this profile typically encrypted, decision usually based from cfg->getIndentyLabel() ...
virtual ~OsConfigEncryption()
If not NULL, a binary prefix header on files to tell if files are encrypted or not.
Definition: OsConfigEncryption.h:57
virtual OsStatus decrypt(OsConfigDb *cfg, OsEncryption *encryption, char *buffer, int buffLen)=0
Handle the details of decrypting, look in OsEncryption instance for results.
Definition: OsConfigDb.h:67
Definition: OsConfigEncryption.h:35
int UtlBoolean
Definition: UtlDefs.h:41
virtual OsStatus encrypt(OsConfigDb *cfg, OsEncryption *encryption, char *buffer, int buffLen)=0
Handle the details of encrypting, look in OsEncryption instance for results.
virtual UtlBoolean isWriteEncryptedEnabled()=0
Is writing profile encrypted on/off at a system level.