terminalsecurity/SCP/SCPServer/inc/SCPConfiguration.h
branchRCL_3
changeset 13 86979fe66c4c
parent 0 b497e44ab2fc
child 24 13d7c31c74e0
--- a/terminalsecurity/SCP/SCPServer/inc/SCPConfiguration.h	Mon Mar 15 12:43:15 2010 +0200
+++ b/terminalsecurity/SCP/SCPServer/inc/SCPConfiguration.h	Wed Mar 31 23:00:03 2010 +0300
@@ -29,7 +29,8 @@
 enum TSCPParamType
     {
     EParTypeInt = 0,
-    EParTypeDesc
+    EParTypeDesc,
+    EParTypeBool
     };
 
 // LOCAL CONSTANTS
@@ -54,6 +55,13 @@
 const TInt KParamIDBlockedAtTime = 6;
 
 const TInt KParamIDBlockedInOOS = 7;
+// ID number for the encrypted security code.
+const TInt KParamIDCryptoCode = 8;
+//ID number for the boolean for the configuartion check
+const TInt KParamIDConfigChecked = 9;
+
+// Total number of Param IDs
+const TInt KTotalParamIDs = 9;
 
 //#ifdef __SAP_DEVICE_LOCK_ENHANCEMENTS
 #define SCP_PARAMETERS_WithFlag { &iConfigFlag, \
@@ -62,7 +70,9 @@
                          &iEnhSecCode, \
                          &iFailedAttempts, \
                          &iBlockedAtTime, \
-                         &iBlockedInOOS \
+                         &iBlockedInOOS, \
+                         &iCryptoCode, \
+						 &iConfigChecked \
                          };
 
 #define SCP_PARAMIDS_WithFlag    {  KParamIDConfigFlag, \
@@ -71,7 +81,9 @@
                            KParamIDEnhSecCode, \
                            KParamIDFailedAttempts, \
                            KParamIDBlockedAtTime, \
-                           KParamIDBlockedInOOS \
+                           KParamIDBlockedInOOS, \
+                           KParamIDCryptoCode, \
+						   KParamIDConfigChecked \
                         };
 
 #define SCP_PARAMTYPES_WithFlag { EParTypeInt, \
@@ -80,7 +92,9 @@
                          EParTypeDesc, \
                          EParTypeInt, \
                          EParTypeDesc, \
-                         EParTypeInt \
+                         EParTypeInt, \
+                         EParTypeDesc, \
+						 EParTypeBool \
                        };
 
 //#else // !__SAP_DEVICE_LOCK_ENHANCEMENTS                   
@@ -155,6 +169,15 @@
         */
         void TransformStringL( TBool aEncrypt, TDes& aInput, TDes& aOutput );              
         
+        /**
+        * Function to check for any ECOM plugin implementing the MDMEncryptionUtilInterface exist in ROM only.
+        * If any plugin is implemented then Encrypts or decrypts the input string in aInput, saving the output in aOutput.
+        * If the input is not an exact multiple of a DES block, 0-padding is used. The
+        * output buffer must be large enough to store the output blocks.
+        * Returns   ETrue if plugin is implemented & exists in ROM only.
+        *           EFalse if plugin is not implemented.        
+        */
+        TBool NativeTransform(TBool aEncrypt, TDes& aInput, TDes& aOutput);        
 
 	public:  // Data
 	    /** Configuration valid -flag */        
@@ -167,6 +190,9 @@
         TFileName iConfigFileName; 
         TInt iBlockedInOOS;
         
+        //Flag to check whether Configuration checked already
+        TBool iConfigChecked;
+        
         /** A ptr to a connected RFs, not owned */
         RFs* iFsSession;
         
@@ -178,6 +204,8 @@
         /** The time since the code has been blocked */
         TBuf<KSCPMaxInt64Length> iBlockedAtTime;
 //#endif // __SAP_DEVICE_LOCK_ENHANCEMENTS       
+// Member to hold the encrypted/decrypted security code from Crpto HW encryption algorithm
+        TSCPCryptoCode iCryptoCode;
 
     };