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

C / C++ / MFC

 
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 
jkirkerx wrote:
Your example is very similar to what I wrote the 4th time, except you had the Base64 piece that I needed.


Great.

jkirkerx wrote:
Side question, How do get the length of a BYTE* for pwlen


A BYTE is an unsigned char and typically for normal NULL terminated strings you would use strlen[^] or _tcslen[^] for obtaining the length of the string excluding the NULL terminator. This would be very common for username/password/key string variables.

However... in your case you are passing a constant array of BYTE so you could use the sizeof operator[^] to get the length in bytes.

C++
CryptHashData(hHash, KEY_192, sizeof(KEY_192), 0);


I do not see anything wrong with the CryptSetKeyParam function you have shown. Are you receiving an error here?

Best Wishes,
-David Delaune
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 
GeneralRe: DES Encryption Pin
jkirkerx17-Dec-11 20:49
professionaljkirkerx17-Dec-11 20:49 
GeneralRe: DES Encryption Pin
Randor 18-Dec-11 3:55
professional Randor 18-Dec-11 3:55 
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 
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 

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.