Click here to Skip to main content
15,895,011 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: DES Encryption Pin
jkirkerx18-Dec-11 8:32
professionaljkirkerx18-Dec-11 8:32 
GeneralRe: DES Encryption Pin
Randor 18-Dec-11 11:29
professional Randor 18-Dec-11 11:29 
GeneralRe: DES Encryption Pin
jkirkerx18-Dec-11 14:18
professionaljkirkerx18-Dec-11 14:18 
GeneralRe: DES Encryption Pin
Randor 19-Dec-11 6:19
professional Randor 19-Dec-11 6:19 
GeneralRe: DES Encryption Pin
jkirkerx19-Dec-11 8:06
professionaljkirkerx19-Dec-11 8:06 
GeneralRe: DES Encryption Pin
Randor 19-Dec-11 8:29
professional Randor 19-Dec-11 8:29 
GeneralRe: DES Encryption Pin
jkirkerx19-Dec-11 8:47
professionaljkirkerx19-Dec-11 8:47 
GeneralRe: DES Encryption Pin
jkirkerx19-Dec-11 9:30
professionaljkirkerx19-Dec-11 9:30 
This was my interpretation of the advice. I'll take it for a test run, if good, I need to figure out how to code the key.

CSS
BYTE DesKeyBlob_64[] = {
0x08,0x02,0x00,0x00,0x01,0x66,0x00,0x00, // BLOB header
0x08,0x00,0x00,0x00,                     // key length, in bytes
0xf1,0x0e,0x25,0x7c,0x6b,0xce,0x0d,0x34  // DES key with parity
};

// My Keys
BYTE    KEY_64[8]   = {42, 16, 93, 156, 78, 4, 218, 32};
BYTE    IV_64[8]    = {55, 103, 246, 79, 36, 99, 167, 3};

<pre>
// Aquire a handle to the Encryption provider
bResult = CryptAcquireContextW( &hProv, 0, MS_ENHANCED_PROV, PROV_RSA_FULL, 0);
	
// hProv - Set the Key
bResult = CryptImportKey(hProv, DesKeyBlob_64, sizeof(DesKeyBlob_64), 0, CRYPT_EXPORTABLE, &hKey);

// hProv - Set the Algorithm
bResult = CryptSetKeyParam(hKey, KP_ALGID, (BYTE*)CALG_DES, 0);
			
// hProv - IV
bResult = CryptSetKeyParam(hKey, KP_IV, IV_64, 0);




GeneralRe: DES Encryption Pin
Randor 19-Dec-11 10:36
professional Randor 19-Dec-11 10:36 
GeneralRe: DES Encryption Pin
jkirkerx19-Dec-11 10:53
professionaljkirkerx19-Dec-11 10:53 
GeneralPerfect Match! Pin
jkirkerx19-Dec-11 12:13
professionaljkirkerx19-Dec-11 12:13 
GeneralRe: Perfect Match! Pin
Randor 19-Dec-11 14:03
professional Randor 19-Dec-11 14:03 
GeneralRe: Perfect Match! Pin
jkirkerx19-Dec-11 14:49
professionaljkirkerx19-Dec-11 14:49 
GeneralRe: DES Encryption Pin
jkirkerx16-Dec-11 7:59
professionaljkirkerx16-Dec-11 7:59 
AnswerSymmetric-key - Initialization Vector Pin
jkirkerx16-Dec-11 18:04
professionaljkirkerx16-Dec-11 18:04 
GeneralRe: Symmetric-key - Initialization Vector Pin
Chris Losinger17-Dec-11 9:38
professionalChris Losinger17-Dec-11 9:38 
QuestionInterview Preparation Pin
pix_programmer15-Dec-11 18:23
pix_programmer15-Dec-11 18:23 
AnswerRe: Interview Preparation Pin
Chandrasekharan P15-Dec-11 22:07
Chandrasekharan P15-Dec-11 22:07 
Questionmemory leaking in playing video using DirectShow. Pin
Le@rner14-Dec-11 23:48
Le@rner14-Dec-11 23:48 
QuestionRe: memory leaking in playing video using DirectShow. Pin
CPallini15-Dec-11 1:39
mveCPallini15-Dec-11 1:39 
AnswerRe: memory leaking in playing video using DirectShow. Pin
Le@rner15-Dec-11 17:47
Le@rner15-Dec-11 17:47 
QuestionConnecting to SQL CE from MFC Pocket PC 2003 Pin
Vieru Dorin14-Dec-11 21:10
Vieru Dorin14-Dec-11 21:10 
AnswerRe: Connecting to SQL CE from MFC Pocket PC 2003 Pin
Richard MacCutchan14-Dec-11 22:20
mveRichard MacCutchan14-Dec-11 22:20 
QuestionLibrary to solve optimization matrix Pin
qwerty_201114-Dec-11 16:49
qwerty_201114-Dec-11 16:49 
AnswerRe: Library to solve optimization matrix Pin
Stefan_Lang14-Dec-11 22:34
Stefan_Lang14-Dec-11 22:34 

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.