Hi,
I have made a simple program which tries to encrypt the Symbian native
database using my own encryption routine.
I attempted doing this by Writing my own class which was derived from
CBoundedSecurityBase.
I gave dummy implementations to all the functions and also created classes
derived from CSecurityEncryptBase & CSecurityDecryptBase.
This is the usage of the code :
Now it fails at this lineCode://Creating Encrpted database TBool usedEncrypter = EFalse; CSecurityBase* securityBase = CAesSecurity::NewL(); securityBase->SetL(TPtrC(), KPassword); //Set the password for encryption // Get the key CSecurityEncryptBase* encryptBase = securityBase->NewEncryptL(TPtrC8()); //Get the key CSecurityDecryptBase* decryptBase = securityBase->NewDecryptL(TPtrC8()); TFileName DbFileName(KDBFile); //CompleteWithAppPath(DbFileName); TInt err = iDB.Open(iFs,DbFileName,TPtrC(),decryptBase); if(err != KErrNone) { err = iDB.Replace(iFs,DbFileName,TPtrC(),encryptBase); CreateTablesL(); InsertRecordsInDBL(); CompactDb(); usedEncrypter = ETrue; } delete securityBase; if(!usedEncrypter) delete encryptBase; //delete decryptBase;
and gives this wierd panic code.Code:err = iDB.Replace(iFs,DbFileName,TPtrC(),encryptBase);
Has anybody tried something similar or knows the reasons for the same are
welcome to elaborate.
Thanks.
--Mayur.



