|
|
|
Cryptography API - ШИФРОВАНИЕ
|
|||
|---|---|---|---|
|
#18+
Visual C++ 6.0 Хочу зашифровать строку согласно описанию в главе 21 книги Дэвид Bennett на странице 409 1998 г. Издания “Visual C++ 5” руководство разработчика Cryptography API Описано доступно, НО НЕ РАБОТАЕТ. typedef unsigned char byte; byte bSecreet[100] = "semifinal 05.07.2006 France - Portugal"; HCRYPTPROV hCsp; // определено в #include "Wincrypt.h" HCRYPTKEY hSessionKey; DWORD dwSecretLen; CString tmpStr; // Cryptapi.lib - отсутствует у меня // creating the key of создание ключа сеанса if(!CryptGenKey(hCsp,CALG_RC4,CRYPT_EXPORTABLE,&hSessionKey)) { AfxMessageBox(tmpStr); } error C2065: 'HCRYPTPROV' : undeclared identifier error C2146: syntax error : missing ';' before identifier 'hCsp' error C2065: 'hCsp' : undeclared identifier error C2065: 'HCRYPTKEY' : undeclared identifier error C2146: syntax error : missing ';' before identifier 'hSessionKey' error C2065: 'hSessionKey' : undeclared identifier error C2065: 'CryptGenKey' : undeclared identifier error C2065: 'CALG_RC4' : undeclared identifier error C2065: 'CRYPT_EXPORTABLE' : undeclared identifier в файл stdafx.h поставил 2 строки, проверил присутствие подключаемых файлов, найдено #include <windows.h> - на винчестере имеется #include <wincrypt.h> - на винчестере имеется СПАСИБО ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 12.07.2006, 13:11 |
|
||
|
|

start [/forum/topic.php?fid=57&fpage=344&tid=2030851]: |
0ms |
get settings: |
7ms |
get forum list: |
15ms |
check forum access: |
3ms |
check topic access: |
3ms |
track hit: |
41ms |
get topic data: |
12ms |
get forum data: |
3ms |
get page messages: |
32ms |
get tp. blocked users: |
1ms |
| others: | 206ms |
| total: | 323ms |

| 0 / 0 |
