Click here to Skip to main content
16,008,299 members
Home / Discussions / Mobile
   

Mobile

 
QuestionConnecting to SQL Server Pin
three.leaf17-Sep-08 2:29
three.leaf17-Sep-08 2:29 
AnswerRe: Connecting to SQL Server Pin
funklet4-Oct-08 3:21
funklet4-Oct-08 3:21 
QuestionSetWindowsHook - Record stylus tapping Pin
mjmim16-Sep-08 0:47
mjmim16-Sep-08 0:47 
QuestionHow to add new OS Language Pin
BlrBoy14-Sep-08 22:32
BlrBoy14-Sep-08 22:32 
QuestionDisable sleep Pin
Agweet12-Sep-08 2:13
Agweet12-Sep-08 2:13 
AnswerRe: Disable sleep Pin
Hurricane300029-Sep-08 10:47
Hurricane300029-Sep-08 10:47 
AnswerRe: Disable sleep Pin
Joel Ivory Johnson5-Nov-08 18:02
professionalJoel Ivory Johnson5-Nov-08 18:02 
QuestioncryptAPI in CE 6.0 Pin
Suresh Ramasamy10-Sep-08 19:38
Suresh Ramasamy10-Sep-08 19:38 
Hi Iam trying with Assymetric Encryption with cryptAPI in CE 6.0... GetCryptoKey Iam passing public key and try to encrypt it.. but it gives error... can any body check the GetCryptoKey ()function and give me the suggesstions

static public byte[] Encrypt(string pulickey, byte[] data)
{
if (!WinApi.CryptAcquireContext(ref hProv, null, WinApi.MS_DEF_PROV,
WinApi.PROV_RSA_FULL, WinApi.CRYPT_VERIFYCONTEXT))
Failed("CryptAcquireContext");

// generate encryption key from passphrase
hKey = GetCryptoKey(hProv, pulickey);

// determine how large of a buffer is required
// to hold the encrypted data
uint dataLength = (uint)data.Length;
uint bufLength = (uint)data.Length;
if (!WinApi.CryptEncrypt(hKey, IntPtr.Zero, true,
0, null, ref dataLength, bufLength))
Failed("CryptEncrypt");
}

static private IntPtr GetCryptoKey(IntPtr hProv, string pulickey)
{
// crypto handles
IntPtr hHash = IntPtr.Zero;
IntPtr hKey = IntPtr.Zero;

try
{
// create 128 bit hash object
if (!WinApi.CryptCreateHash(hProv,
WinApi.CALG_MD5, IntPtr.Zero, 0, ref hHash))
Failed("CryptCreateHash");

// add passphrase to hash
byte[] keyData = ASCIIEncoding.ASCII.GetBytes(passphrase);
if (!WinApi.CryptHashData(hHash, keyData, (uint)keyData.Length, 0))
Failed("CryptHashData");


// Get a handle to the key exchange key.
if (!WinApi.CryptGetUserKey(hProv, 1, ref hProv))
{
uint dwResult = WinApi.GetLastError();
// printf("Error %x during CryptGetUserKey!\n", GetLastError());
//goto done;
}




if (!WinApi.CryptImportKey(hProv, keyData, (uint)keyData.Length, 0, 0, ref hProv))
{
uint dwResult = WinApi.GetLastError();

}
if (!WinApi.CryptGenKey(hProv, WinApi.CALG_RC2, WinApi.CRYPT_EXPORTABLE, ref hKey))
{
uint dwResult = WinApi.GetLastError();
//MessageBox("Error CryptGenKey() failed.", "Information", MB_OK);
// return;
}



// if (!WinApi.CryptGenKey(hProv, WinApi.CALG_RC2, WinApi.CRYPT_EXPORTABLE, ref hKey))
// {
// Failed("CryptGenKey");
// }
}
QuestionKacommon.dll problem Pin
blacklord8110-Sep-08 7:04
blacklord8110-Sep-08 7:04 
Questionserial communication using bluetooth in j2me Pin
manju23reddy8-Sep-08 1:49
manju23reddy8-Sep-08 1:49 
AnswerRe: serial communication using bluetooth in j2me Pin
akirilov9-Sep-08 0:10
akirilov9-Sep-08 0:10 
GeneralRe: serial communication using bluetooth in j2me Pin
manju23reddy16-Sep-08 21:55
manju23reddy16-Sep-08 21:55 
AnswerRe: serial communication using bluetooth in j2me Pin
ranjith2732825-Aug-10 18:57
ranjith2732825-Aug-10 18:57 
QuestionPrinting Text in Smart device Pin
Dushan1237-Sep-08 17:24
Dushan1237-Sep-08 17:24 
AnswerRe: Printing Text in Smart device Pin
akirilov8-Sep-08 21:37
akirilov8-Sep-08 21:37 
GeneralRe: Printing Text in Smart device Pin
Dushan1239-Sep-08 1:15
Dushan1239-Sep-08 1:15 
GeneralRe: Printing Text in Smart device Pin
akirilov9-Sep-08 1:30
akirilov9-Sep-08 1:30 
GeneralRe: Printing Text in Smart device Pin
Dushan1239-Sep-08 17:28
Dushan1239-Sep-08 17:28 
GeneralRe: Printing Text in Smart device Pin
Hurricane300029-Sep-08 7:50
Hurricane300029-Sep-08 7:50 
GeneralRe: Printing Text in Smart device Pin
Hurricane300029-Sep-08 7:57
Hurricane300029-Sep-08 7:57 
AnswerRe: Printing Text in Smart device Pin
Ivan_ING9-Oct-08 19:00
Ivan_ING9-Oct-08 19:00 
QuestionGoogle Maps and GPS application Pin
moos37-Sep-08 9:31
moos37-Sep-08 9:31 
AnswerRe: Google Maps and GPS application Pin
N a v a n e e t h7-Sep-08 19:11
N a v a n e e t h7-Sep-08 19:11 
GeneralRe: Google Maps and GPS application Pin
moos38-Sep-08 0:59
moos38-Sep-08 0:59 
AnswerRe: Google Maps and GPS application Pin
renu.iitkgp16-Oct-08 18:09
renu.iitkgp16-Oct-08 18:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.