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

C / C++ / MFC

 
AnswerRe: How to access application's extern variable inside a dll Pin
Chris Losinger16-Dec-11 4:16
professionalChris Losinger16-Dec-11 4:16 
GeneralRe: How to access application's extern variable inside a dll Pin
rahul.kulshreshtha16-Dec-11 5:22
rahul.kulshreshtha16-Dec-11 5:22 
GeneralRe: How to access application's extern variable inside a dll Pin
Richard MacCutchan16-Dec-11 7:04
mveRichard MacCutchan16-Dec-11 7:04 
GeneralRe: How to access application's extern variable inside a dll Pin
Chris Losinger16-Dec-11 8:03
professionalChris Losinger16-Dec-11 8:03 
GeneralRe: How to access application's extern variable inside a dll Pin
Richard MacCutchan16-Dec-11 22:42
mveRichard MacCutchan16-Dec-11 22:42 
QuestionWhich function can I use instead of ShowControlBar Pin
adityarao3115-Dec-11 19:42
adityarao3115-Dec-11 19:42 
AnswerRe: Which function can I use instead of ShowControlBar Pin
Resmi Anna15-Dec-11 21:45
Resmi Anna15-Dec-11 21:45 
QuestionDES Encryption Pin
jkirkerx15-Dec-11 19:12
professionaljkirkerx15-Dec-11 19:12 
I don't understand why I can do CryptCreateHash with CALG_MD5 no problem, but when I use CALG_DES, It fails.

I want just the Basic DES Encryption, using a pair of keys. I suspect that I have the wrong CryptAcquireContext Statement, in which I may be calling the wrong service, but I can't find any reference other than PROV_RS_FULL. I did some research and I'll swear that the DES is a member of the MS_STRONG_PROV.

My Goal is to replicate a function in asp.net to c++

C#
bResult = CryptAcquireContextW( &hProv, 0, MS_STRONG_PROV, PROV_RSA_FULL, 0);
    if(!bResult){
        bResult=CryptAcquireContext(&hProv, NULL, MS_STRONG_PROV, PROV_RSA_FULL, CRYPT_NEWKEYSET);
        return 0;
    }
    bResult = CryptCreateHash(hProv, CALG_DES, 0, 0, &hHash);


asp.net function:
VB
Dim cryptoProvider As DESCryptoServiceProvider = New DESCryptoServiceProvider()
            Dim ms As MemoryStream = New MemoryStream()
            Dim cs As CryptoStream = New CryptoStream(ms, cryptoProvider.CreateEncryptor(KEY_64, IV_64), _
            CryptoStreamMode.Write)
            Dim sw As StreamWriter = New StreamWriter(cs)

SuggestionRe: DES Encryption Pin
Code-o-mat15-Dec-11 22:20
Code-o-mat15-Dec-11 22:20 
GeneralRe: DES Encryption Pin
jkirkerx16-Dec-11 6:40
professionaljkirkerx16-Dec-11 6:40 
GeneralRe: DES Encryption Pin
Code-o-mat16-Dec-11 7:01
Code-o-mat16-Dec-11 7:01 
AnswerRe: DES Encryption Pin
Richard MacCutchan15-Dec-11 23:40
mveRichard MacCutchan15-Dec-11 23:40 
AnswerRe: DES Encryption Pin
Richard MacCutchan16-Dec-11 1:16
mveRichard MacCutchan16-Dec-11 1:16 
GeneralRe: DES Encryption Pin
jkirkerx16-Dec-11 7:19
professionaljkirkerx16-Dec-11 7:19 
GeneralRe: DES Encryption Pin
Richard MacCutchan16-Dec-11 7:40
mveRichard MacCutchan16-Dec-11 7:40 
GeneralRe: DES Encryption Pin
Randor 16-Dec-11 7:59
professional Randor 16-Dec-11 7:59 
GeneralRe: DES Encryption Pin
jkirkerx16-Dec-11 8:12
professionaljkirkerx16-Dec-11 8:12 
GeneralRe: DES Encryption Pin
jkirkerx16-Dec-11 9:00
professionaljkirkerx16-Dec-11 9:00 
GeneralRe: DES Encryption Pin
Randor 16-Dec-11 9:41
professional Randor 16-Dec-11 9:41 
GeneralRe: DES Encryption Pin
jkirkerx16-Dec-11 10:31
professionaljkirkerx16-Dec-11 10:31 
GeneralRe: DES Encryption Pin
Randor 16-Dec-11 11:04
professional Randor 16-Dec-11 11:04 
GeneralRe: DES Encryption Pin
jkirkerx16-Dec-11 12:06
professionaljkirkerx16-Dec-11 12:06 
GeneralRe: DES Encryption Pin
Randor 16-Dec-11 13:25
professional Randor 16-Dec-11 13:25 
GeneralRe: DES Encryption Pin
jkirkerx17-Dec-11 8:05
professionaljkirkerx17-Dec-11 8:05 
GeneralRe: DES Encryption Pin
Randor 17-Dec-11 9:47
professional Randor 17-Dec-11 9:47 

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.