Read-only archive of the All About Symbian forum (2001–2013) · About this archive

Pls see this.....

1 replies · 1,067 views · Started 15 October 2007

Hai,
Iam encrypting the fields of Contact.I read the firstName from the phoneBook.Now I want to encrypt that.Iam using AES Algorithm(that code is with me).Iam using Encrypt Function.Now I have to pass this FirstName to encrypt Function.But its parameter is unsigned char*.How to get the text from firstName to unsigned char*?Pls help me.Iam not understanding how to do this.


//Get FirstName

TInt findpos( fieldSet.Find( KUidContactFieldGivenName ) );
CContactTextField* firstName;
CContactItemField& firstNameField = fieldSet[findpos];
firstName = firstNameField.TextStorage();

//Encrypt the FirstName
Encrypt(FirstName,dwDataLength,DKey);//First Parameter is unsigned char*