Click here to Skip to main content
15,888,454 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Accessing Error-Checking of local hard drives in XP (in c++ code) Pin
jai200220-Sep-05 13:53
jai200220-Sep-05 13:53 
Questionopening default mail client Pin
rohit.dhamija19-Sep-05 19:02
rohit.dhamija19-Sep-05 19:02 
Questionhttp mime part Pin
ppp00119-Sep-05 17:36
ppp00119-Sep-05 17:36 
AnswerRe: http mime part Pin
Jose Lamas Rios19-Sep-05 18:11
Jose Lamas Rios19-Sep-05 18:11 
QuestionPublic/private keys w/CryptoAPI Pin
Michael Dunn19-Sep-05 16:17
sitebuilderMichael Dunn19-Sep-05 16:17 
AnswerRe: Public/private keys w/CryptoAPI Pin
oustar19-Sep-05 21:00
oustar19-Sep-05 21:00 
GeneralRe: Public/private keys w/CryptoAPI Pin
Michael Dunn20-Sep-05 5:53
sitebuilderMichael Dunn20-Sep-05 5:53 
AnswerRe: Public/private keys w/CryptoAPI Pin
Michael Dunn20-Sep-05 7:19
sitebuilderMichael Dunn20-Sep-05 7:19 
(Posting the answer in case anyone ever sees this)
After much trial and much more error, I groked how the API works. When you call CryptExportKey(PRIVATEKEYBLOB) you actually get both keys in the blob. Also, while I was importing the public key in my code, both keys were already in my key store since I generated them on the same box, so CryptDecript() was automagically using the other key in the pair.
So calling CryptAcquireContext() with CRYPT_DELETEKEYSET removed the keys from the store; then if I import just the public key it can't encrypt then decrypt the same data. whee.

--Mike--
Visual C++ MVP Cool | :cool:
LINKS~! Ericahist | 1ClickPicGrabber | NEW~! CP SearchBar v3.0 | C++ Forum FAQ
"Linux is good. It can do no wrong. It is open source so must be right. It has penguins. I want to eat your brain."
  -- Paul Watson, Linux Zombie

Questionint to CString Pin
benjnp19-Sep-05 15:44
benjnp19-Sep-05 15:44 
AnswerRe: int to CString Pin
Michael Dunn19-Sep-05 15:56
sitebuilderMichael Dunn19-Sep-05 15:56 
AnswerRe: int to CString Pin
kakan19-Sep-05 18:58
professionalkakan19-Sep-05 18:58 
QuestionDeviceIoControl() returns zero Pin
momer19-Sep-05 15:44
momer19-Sep-05 15:44 
QuestionMultithread Pin
benjnp19-Sep-05 14:02
benjnp19-Sep-05 14:02 
AnswerRe: Multithread Pin
User 58385219-Sep-05 14:23
User 58385219-Sep-05 14:23 
GeneralRe: Multithread Pin
benjnp19-Sep-05 14:34
benjnp19-Sep-05 14:34 
GeneralRe: Multithread Pin
User 58385219-Sep-05 14:38
User 58385219-Sep-05 14:38 
AnswerRe: Multithread Pin
benjnp19-Sep-05 14:41
benjnp19-Sep-05 14:41 
GeneralRe: Multithread Pin
Cedric Moonen19-Sep-05 20:12
Cedric Moonen19-Sep-05 20:12 
AnswerRe: Multithread Pin
RichardS19-Sep-05 14:53
RichardS19-Sep-05 14:53 
GeneralRe: Multithread Pin
benjnp19-Sep-05 15:33
benjnp19-Sep-05 15:33 
GeneralRe: Multithread Pin
RichardS20-Sep-05 4:21
RichardS20-Sep-05 4:21 
AnswerRe: Multithread Pin
Tim Smith19-Sep-05 18:14
Tim Smith19-Sep-05 18:14 
AnswerRe: Multithread Pin
Jose Lamas Rios19-Sep-05 18:27
Jose Lamas Rios19-Sep-05 18:27 
GeneralRe: Multithread Pin
benjnp20-Sep-05 13:44
benjnp20-Sep-05 13:44 
AnswerRe: Multithread Pin
Roger Stoltz19-Sep-05 21:20
Roger Stoltz19-Sep-05 21:20 

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.