Click here to Skip to main content
15,916,042 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionFont: Exist or not? Pin
BlackSmith22-Aug-02 7:09
BlackSmith22-Aug-02 7:09 
AnswerRe: Font: Exist or not? Pin
l a u r e n22-Aug-02 7:17
l a u r e n22-Aug-02 7:17 
AnswerRe: Font: Exist or not? Pin
Tomasz Sowinski22-Aug-02 7:29
Tomasz Sowinski22-Aug-02 7:29 
GeneralDefault CSP and GetLastError() (Encryption Problems) Pin
esapp42022-Aug-02 6:11
esapp42022-Aug-02 6:11 
GeneralRe: Default CSP and GetLastError() (Encryption Problems) Pin
Martin Ziacek22-Aug-02 6:35
Martin Ziacek22-Aug-02 6:35 
GeneralRe: Default CSP and GetLastError() (Encryption Problems) Pin
Martin Ziacek22-Aug-02 7:05
Martin Ziacek22-Aug-02 7:05 
GeneralRe: Default CSP and GetLastError() (Encryption Problems) Pin
esapp42022-Aug-02 7:34
esapp42022-Aug-02 7:34 
GeneralRe: Default CSP and GetLastError() (Encryption Problems) Pin
esapp42022-Aug-02 9:02
esapp42022-Aug-02 9:02 
OK, things are going better, but still having trouble.

After modifying my code in accordance with the above mentioned advice, I no longer have a problem with CryptAquireContext.

Now I have a problem with this:
<br />
// Derive a session key from the hash object. <br />
if(!CryptDeriveKey(hCryptProv, ENCRYPT_ALGORITHM, hHash, KEYLENGTH, &hKey))<br />
{<br />
	HandleError("Error during CryptDeriveKey.");<br />
	return -7;<br />
}<br />


returning error 2148073481 (Invalid Flags Specified). The only Flag param is the 4th.
KEYLENGTH is defined as 0x00800000 at the top of my file for 128-bit encription key,
and ENCRYPT_ALGORITHM is defined as CALG_RC4.

I am giving it a valid hCryptProv and a valid hHash.

wincrypt.h defines only on flag under the section for CryptDeriveKey (KEY_LENGTH_MASK 0xFFFF0000).

I am new to the CryptoAPI and cant see what I am doing wrong.

Martin?? Anyone??
GeneralRe: Default CSP and GetLastError() (Encryption Problems) Pin
esapp42022-Aug-02 9:28
esapp42022-Aug-02 9:28 
GeneralRe: Default CSP and GetLastError() (Encryption Problems) Pin
Martin Ziacek22-Aug-02 19:07
Martin Ziacek22-Aug-02 19:07 
Generalswapping bytes Pin
Anonymous22-Aug-02 6:04
Anonymous22-Aug-02 6:04 
GeneralRe: swapping bytes Pin
Chris Losinger22-Aug-02 6:16
professionalChris Losinger22-Aug-02 6:16 
GeneralRe: swapping bytes Pin
Anonymous22-Aug-02 7:29
Anonymous22-Aug-02 7:29 
GeneralMessages Between CFormViews Pin
John Gilbert22-Aug-02 5:57
John Gilbert22-Aug-02 5:57 
GeneralRe: Messages Between CFormViews Pin
Tomasz Sowinski22-Aug-02 7:32
Tomasz Sowinski22-Aug-02 7:32 
GeneralRe: Messages Between CFormViews Pin
John Gilbert22-Aug-02 7:52
John Gilbert22-Aug-02 7:52 
Generalmkdir Pin
pnpfriend22-Aug-02 5:52
pnpfriend22-Aug-02 5:52 
GeneralRe: mkdir Pin
Mustafa Demirhan22-Aug-02 10:52
Mustafa Demirhan22-Aug-02 10:52 
GeneralRe: mkdir Pin
Todd Smith22-Aug-02 17:30
Todd Smith22-Aug-02 17:30 
Generalsecond CStatusBar Pin
22-Aug-02 5:35
suss22-Aug-02 5:35 
GeneralRe: second CStatusBar Pin
Enis22-Aug-02 6:30
Enis22-Aug-02 6:30 
GeneralMAPI Delivery receipt Pin
Enis22-Aug-02 4:36
Enis22-Aug-02 4:36 
QuestionON_COMMAND macro in imported files?!!? Pin
Jawache22-Aug-02 4:15
Jawache22-Aug-02 4:15 
AnswerRe: ON_COMMAND macro in imported files?!!? Pin
Jon Hulatt22-Aug-02 4:20
Jon Hulatt22-Aug-02 4:20 
GeneralRe: ON_COMMAND macro in imported files?!!? Pin
Jawache22-Aug-02 5:48
Jawache22-Aug-02 5:48 

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.