Click here to Skip to main content
15,890,506 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
DATA_BLOB in;
DATA_BLOB out;
BYTE *pin=(BYTE*)"FIPL2";
DWORD din=strlen((char*)pin)+1;
	in.pbData = pin;
	in.cbData = din;
if(CryptProtectData(&in,L"what is it",NULL,NULL,NULL,0,&out))
{
    BYTE *b=out.pbData;
    // <<--HERE
}


At the end of the if block (marked with "<<--HERE"), I want to convert it into hexadecimal to save as my wifi password. How do I do that?
Posted
Updated 14-Mar-10 2:47am
v4

1 solution

All you have to do is iterate through the array and create a string that appends one byte at a time formatted as a hex value.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900