當前位置:首頁 » 編程軟體 » crypto編譯

crypto編譯

發布時間: 2022-07-04 05:14:58

❶ 如何編譯openssl 64位庫

、使用VS2005下的Visual Studio 2005 Command Prompt進入控制台模式(這個模式會自動設置各種環境變數)
、解壓縮openssl的包,進入openssl的目錄
、perl configure VC-WIN32
盡量在這個目錄下執行該命令,否則找不到Configure文件,或者指定完整的Configure文件路徑。
、ms\do_ms
解壓目錄下執行ms\do_ms命令
、nmake -f ms\ntdll.mak編譯後在openssl解壓目錄下執行,完成編譯後。輸出的文件在out32dll裡面,包括應用程序的可執行文件、lib文件和dll文件
注意:在運行第五步時,cl編譯器會抱怨說.\crypto\des\enc_read.c文件的read是The POSIX name for this item is deprecated(不被推薦的),建議使用_read。呵呵,我可不想將OpenSSL中的所有的read函數修改為_read。再看cl的錯誤代碼 error C2220,於是上MSDN上查找:
warning treated as error - no object file generated
/WX tells the compiler to treat all warnings as errors. Since an error occurred, no object or executable file was generated.
是由於設置了/WX選項,將所有的警告都作為錯誤對待,所以。。。
於是打開OpenSSL目錄下的MS目錄下的ntdll.mak文件,將CFLAG的/WX選項去掉,存檔。。。

❷ crypto++庫中有哪些對稱加密函數

在對稱加密演算法中常用的演算法有:DES、3DES、TDEA、Blowfish、RC2、RC4、RC5、IDEA、SKIPJACK、AES等。

❸ 用vs2008編了一段c++程序 用到opencv和crypto++庫 調試無誤 如何把這段程序交叉編譯到實驗室的嵌入式arm

把opencv的庫載入arm的底層的代碼中,關鍵你的arm支持什麼操作系統
arm9可以移植操作系統
調試跟出問題可能跟自己的鍵盤按鍵設置有關,直接不用就行了哦

❹ 編譯netsnmp怎樣鏈接庫crypto

配置snmpd.conf
root@molly:~#snmpconf -g basic_setup

The following installed configuration files were found:

1: ./snmpd.conf

Would you like me to read them in? Their content will be merged with the
output files created by this session.

Valid answer examples: "all", "none","3","1,2,5"

Read in which (default = all): none
************************************************
*** Beginning basic system information setup ***
************************************************
Do you want to configure the information returned in the system MIB group (contact info, etc)? (default = y): y

Configuring: syslocation
Description:
The [typically physical] location of the system.
Note that setting this value here means that when trying to
perform an snmp SET operation to the sysLocation.0 variable will make
the agent return the "notWritable" error code. IE, including
this token in the snmpd.conf file will disable write access to
the variable.
arguments: location_string

The location of the system: At home

Finished Output: syslocation "At home"

Configuring: syscontact
Description:
The contact information for the administrator
Note that setting this value here means that when trying to
perform an snmp SET operation to the sysContact.0 variable will make
the agent return the "notWritable" error code. IE, including
this token in the snmpd.conf file will disable write access to
the variable.
arguments: contact_string

The contact information: SirDice

Finished Output: syscontact SirDice
Do you want to properly set the value of the sysServices.0 OID (if you don't know, just say no)? (default = y): y

Configuring: sysservices
Description:
The proper value for the sysServices object.
arguments: sysservices_number

does this host offer physical services (eg, like a repeater) [answer 0 or 1]: 0
does this host offer datalink/subnetwork services (eg, like a bridge): 0
does this host offer internet services (eg, supports IP): 1
does this host offer end-to-end services (eg, supports TCP): 1
does this host offer application services (eg, supports SMTP): 1

Finished Output: sysservices 76
**************************************
*** BEGINNING ACCESS CONTROL SETUP ***
**************************************
Do you want to configure the agent's access control? (default = y): y
Do you want to allow SNMPv3 read-write user based access (default = y): n
Do you want to allow SNMPv3 read-only user based access (default = y): n
Do you want to allow SNMPv1/v2c read-write community access (default = y): n
Do you want to allow SNMPv1/v2c read-only community access (default = y): y

Configuring: rocommunity
Description:
a SNMPv1/SNMPv2c read-only access community name
arguments: community [default|hostname|network/bits] [oid]

The community name to add read-only access for: public
The hostname or network address to accept this community name from [RETURN for all]:
The OID that this community should be restricted to [RETURN for no-restriction]:

Finished Output: rocommunity public
Do another rocommunity line? (default = y): n
****************************************
*** Beginning trap destination setup ***
****************************************
Do you want to configure where and if the agent will send traps? (default = y): n
****************************************
*** Beginning monitoring setup ***
****************************************
Do you want to configure the agent's ability to monitor various aspects of your system? (default = y): n

Error: An snmpd.conf file already exists in this directory.

'overwrite', 'skip', 'rename' or 'append'? : overwrite

The following files were created:

snmpd.conf

These files should be moved to /usr/local/share/snmp if you
want them used by everyone on the system. In the future, if you add
the -i option to the command line I'll them there automatically for you.

Or, if you want them for your personal use only, them to
/root/.snmp . In the future, if you add the -p option to the
command line I'll them there automatically for you.

root@molly:~#cp snmpd.conf /usr/local/share/snmp/
root@molly:~#service snmpd start
Starting snmpd.
root@molly:~#

安裝就算完成了。
接下來可以簡單測試以下是否可用:
cd /usr/local/net-snmp/share/snmp
/etc/init.d/snmpd stop
snmpd //配置文件為本路徑下的snmpd.conf
此步驟若成功,在/var/log/snmpd.log文件中會看到net-snmp的版本信息。所以每次開啟snmp後,可以查看此文件內容來判斷snmpd進程是否成功開啟。
snmpwalk -v2c -c public localhost system
SNMPv2-MIB::sysDescr.0 = STRING: linux localhost.localdomain 2.4.20-8 #1 Thu Mar 13 17:54:28 EST 2003 i686
SNMPv2-MIB::sysObjectID.0 = OID: NET-SNMP-MIB::netSnmpAgentOIDs.10
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (1248026) 3:28:00.26
SNMPv2-MIB::sysContact.0 = STRING: [email protected]
SNMPv2-MIB::sysName.0 = STRING: localhost.localdomain
SNMPv2-MIB::sysLocation.0 = STRING: china
SNMPv2-MIB::sysServices.0 = INTEGER: 76
SNMPv2-MIB::sysORLastChange.0 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORID.1 = OID: SNMP-FRAMEWORK-MIB::snmpFrameworkMIBCompliance
SNMPv2-MIB::sysORID.2 = OID: SNMP-MPD-MIB::snmpMPDCompliance
SNMPv2-MIB::sysORID.3 = OID: SNMP-USER-BASED-SM-MIB::usmMIBCompliance
SNMPv2-MIB::sysORID.4 = OID: SNMPv2-MIB::snmpMIB
SNMPv2-MIB::sysORID.5 = OID: TCP-MIB::tcpMIB
SNMPv2-MIB::sysORID.6 = OID: IP-MIB::ip
SNMPv2-MIB::sysORID.7 = OID: UDP-MIB::udpMIB
SNMPv2-MIB::sysORID.8 = OID: SNMP-VIEW-BASED-ACM-MIB::vacmBasicGroup
SNMPv2-MIB::sysORID.9 = OID: SNMP-NOTIFICATION-MIB::snmpNotifyFullCompliance
SNMPv2-MIB::sysORID.10 = OID: NOTIFICATION-LOG-MIB::notificationLogMIB
SNMPv2-MIB::sysORDescr.1 = STRING: The SNMP Management Architecture MIB.
SNMPv2-MIB::sysORDescr.2 = STRING: The MIB for Message Processing and Dispatching.
SNMPv2-MIB::sysORDescr.3 = STRING: The management information definitions for the SNMP User-based Security Model.
SNMPv2-MIB::sysORDescr.4 = STRING: The MIB mole for SNMPv2 entities
SNMPv2-MIB::sysORDescr.5 = STRING: The MIB mole for managing TCP implementations
SNMPv2-MIB::sysORDescr.6 = STRING: The MIB mole for managing IP and ICMP implementations
SNMPv2-MIB::sysORDescr.7 = STRING: The MIB mole for managing UDP implementations
SNMPv2-MIB::sysORDescr.8 = STRING: View-based Access Control Model for SNMP.
SNMPv2-MIB::sysORDescr.9 = STRING: The MIB moles for managing SNMP Notification, plus filtering.
SNMPv2-MIB::sysORDescr.10 = STRING: The MIB mole for logging SNMP Notifications.
SNMPv2-MIB::sysORUpTime.1 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.2 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.3 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.4 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.5 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.6 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.7 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.8 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.9 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.10 = Timeticks: (0) 0:00:00.00
若有信息輸出,則測試完成。

❺ qt怎麼加添第三方庫(crypto++)

出錯信息後面應該還有內容吧,比如提示你缺少什麼信息,一般這個錯是因為makefile文件信息不匹配,比如makefile里提到了某些文件,實際上不存在或者路徑變化等

❻ 如何在Windows下編譯OpenSSL

1、使用VS2005下的Visual Studio 2005 Command Prompt進入控制台模式(這個模式會自動設置各種環境變數) 2、解壓縮openssl的包,進入openssl的目錄 3、perl configure VC-WIN32 盡量在這個目錄下執行該命令,否則找不到Configure文件,或者指定完整的Configure文件路徑。 4、ms\do_ms 在解壓目錄下執行ms\do_ms命令 5、nmake -f ms\ntdll.mak編譯後在openssl解壓目錄下執行,完成編譯後。輸出的文件在out32dll裡面,包括應用程序的可執行文件、lib文件和dll文件

❼ 導師給了個密碼學的壓縮包Crypto++ Library 5.6.1,打開都是CPP之類的文件,求解怎麼打開啊!

是crypto++ 吧?
5.6.1版, vc6 到vs2010都可以打開。具體看Readme.txt. 支持的編譯環境列表:

Crypto++ 5.6.1

MSVC 6.0 - 2010 (Windows Mobile 5, 6 and 6.5 details here)
GCC 3.3 - 4.6 (see Linux instructions here)
C++Builder 2010
Intel C++ Compiler 9 - 11.1
Sun Studio 12u1, Express 11/08, Express 06/10
Xcode 3.2.5, Xcode 4.0 and GCC 4.2, targeting Apple iOS (see details here)

❽ 求問怎麼編譯OpenSSL,得到libssl.a 和libcrypto.a,跪求

如何在Windows下編譯OpenSSL (VS2010使用VC10的cl編譯器)
1、安裝ActivePerl//初始化的時候,需要用到perl解釋器
2、使用VS2010下的Visual Studio 2010 Command Prompt進入控制台模式(這個模式會自動設置各種環境變數)
3、解壓縮openssl的包,進入openssl的目錄
4、perl configure VC-WIN32
盡量在這個目錄下執行該命令,否則找不到Configure文件,或者指定完整的Configure文件路徑。
5、ms\do_ms.bat
在解壓目錄下執行ms\do_ms.bat命令
6、nmake -f ms\ntdll.mak
7、nmake -f ms\nt.mak

編譯後
在openssl解壓目錄下執行,完成編譯後。輸出的文件在out32dll (6), out32 (7)裡面,包括應用程序的可執行文件、lib文件和dll文件

注意:在運行第五步時,cl編譯器會抱怨說.\crypto\des\enc_read.c文件的read是The POSIX name for this item is deprecated(不被推薦的),建議使用_read。呵呵,我可不想將OpenSSL中的所有的read函數修改為_read。再看cl的錯誤代碼error C2220,於是上MSDN上查找:
warning treated as error - no object file generated
/WX tells the compiler to treat all warnings as errors. Since an error occurred, no object or executable file was generated.
是由於設置了/WX選項,將所有的警告都作為錯誤對待,所以。。。

於是打開OpenSSL目錄下的MS目錄下的ntdll.mak文件,將CFLAG的/WX選項去掉,存檔。。。
繼續執行nmake -f ms\ntdll.mak

=================================
一、編譯並安裝OpenSSL
1、按照標准步驟從源代碼編譯安裝OpenSSL
在編譯OpenSSL前,需要正確安裝Perl,因為在編譯OpenSSL時需要使用到該程序。

下載最新版本的Perl然後安裝之。
下載最新版本的OpenSSL

然後將源碼解壓縮到某個目錄(如 C:\openssl-0.9.8j)中。

進入openssl源碼目錄。
cd c:\openssl-1.0.1e

以下為參照該目錄下的文件INSTALL.W32的執行過程:
運行configure:
perl Configure VC-WIN32
創建Makefile文件:
ms\do_ms.bat

編譯動態庫:
nmake -f ms\ntdll.mak
編譯靜態庫:
nmake -f ms\nt.mak
測試動態庫:
nmake -f ms\ntdll.mak test
測試靜態庫:
nmake -f ms\nt.mak test
安裝動態庫:
nmake -f ms\ntdll.mak install
安裝靜態庫:
nmake -f ms\nt.mak install
清除上次動態庫的編譯,以便重新編譯:
nmake -f ms\ntdll.mak clean
清除上次靜態庫的編譯,以便重新編譯:
nmake -f ms\nt.mak clean
2、如果嫌麻煩,不想編譯,可以直接用別人做好的windows OpenSSL 安裝包(我用的是0.9.8j版),
可以下載 OpenSSL for Windows,直接安裝。
P.S. OpenSSL for Windows 的源代碼有一些數據類型和VC6的編譯器不兼容,我發現的不兼容的數據類型如下:
在OpenSSL安裝目錄的下的include/bn.h文件中,將
#define BN_ULLONG unsigned long long
#define BN_ULONG unsigned long long
#define BN_LONG long long
分別修改為:
#define BN_ULLONG ULONGLONG
#define BN_ULONG ULONGLONG
#define BN_LONG LONGLONG
否則,會出現編譯錯誤。

二、使用OpenSSL
在VC中配置使用以上的函數庫:
點擊菜單:Tools -> Options,彈出對話框"Options",在該對話框中選擇"Directories"標簽。
在"Show directories for:"的"Include files"選項中新增目錄"C:\openssl\include";
"Library files"選擇中新增目錄"C:\openssl\lib"。
然後在需要鏈接OpenSSL函數庫的工程中加入如下兩句:
#pragma comment(lib, "ssleay32.lib")
#pragma comment(lib, "libeay32.lib")
其作用是將OpenSSL所需的庫導入工程中。
三、問題
我在鏈接OpenSSL的靜態函數庫時遇到類似以下的問題:
Linking...
msvcrt.lib(MSVCRT.dll) : error LNK2005: _strchr already defined in libcmtd.lib(strchr.obj)
...

這是由於OpenSSL的靜態函數庫使用的是了VC的多線程DLL的Release版本,而我的程序使用了多線程靜態鏈接的Release版本。
調整OpenSSL的靜態函數庫使用的庫函數版本即可,調整過程如下:

編輯文件 ms\nt.mak,將該文件第19行
"CFLAG= /MD /Ox /O2 /Ob2 /W3 /WX /Gs0 /GF /Gy /nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DDSO_WIN32 -D_CRT_SECURE_NO_DEPRECATE -
D_CRT_NONSTDC_NO_DEPRECATE /Fdout32 -DOPENSSL_NO_CAMELLIA -DOPENSSL_NO_SEED -DOPENSSL_NO_RC5 -DOPENSSL_NO_MDC2 -DOPENSSL_NO_TLSEXT -DOPENSSL_NO_KRB5 -
DOPENSSL_NO_DYNAMIC_ENGINE"
中的"/MD"修改為"/MT"。然後重新編譯安裝OpenSSL即可。
四、附錄:在VC中對C/C++ 運行時庫不同版本編譯指令說明
《在VC中對C/C++ 運行時庫不同版本編譯指令說明》一文中詳細介紹了連接不同版本庫的編譯指令如下:
C Runtime Library:
/MD MSVCRT.LIB 多線程DLL的Release版本
/MDd MSVCRTD.LIB 多線程DLL的Debug版本
/MT LIBCMT.LIB 多線程靜態鏈接的Release版本
/MTd LIBCMTD.LIB 多線程靜態鏈接的Debug版本
/clr MSVCMRT.LIB 託管代碼和非託管代碼混合
/clr:pure MSVCURT.LIB 純託管代碼
C++ Standard Library:
/MD MSVCPRT.LIB 多線程DLL的Release版本
/MDd MSVCPRTD.LIB 多線程DLL的Debug版本
/MT LIBCPMT.LIB 多線程靜態鏈接的Release版本
/MTd LIBCPMTD.LIB 多線程靜態鏈接的Debug版本
===============================================

一 配置編譯參數
配置編譯參數是進行OpenSSL編譯的第一步,這一步可以確定系統的環境,使用什麼編譯器,默認安裝路徑以及其他一些選項.步驟如下:
1.安裝perl:下載ActivePerl-5.8.8.822-MSWin32-x86-280952.msi,然後點擊msi文件進行安裝!

2..配置編譯參數:下載openssl-1.0.1e.tar.gz,解壓.
vc:首先在C:\Program Files\Microsoft Visual Studio .NET 2010\VC10\bin\目錄下執行vcvars32.bat,然後在解壓後的openssl-1.0.1e目錄,執行命令配置編譯參數:perl Configure VC-WIN32
bc:在解壓後的openssl-0.9.8g目錄下執行:perl Configure BC-32

二 生成批處理文件
在使用configure腳本配置好的編譯參數後,就可以使用批處理命令來生成編譯腳本.生成編譯腳本根據採用編譯器的不同通常使用不同的批處理文件.就目前來說,使用vc編譯的時候有三種選擇:do_ms,do_masm和do_nasm來創建一系列編譯腳本文件,即.mak腳本.步驟如下:
vc:在openssl-1.0.1e目錄下,執行命令來批處理文件:do_ms,do_masm和do_nasm
bc:1.下載nsm09839.zip微軟匯編編譯器,解壓,拷貝到c:/windows目錄下,修改名稱為nasmw.exe;2.在openssl-1.0.1e目錄下,執行命令來批處理文件:ms\do_nasm

三 代碼編譯
vc:
完成上面步驟後,可以看到兩個關鍵腳本文件:nt.mak和ntdll.mak.如果我們需要編譯後的OpenSSL庫是支持動態DLL形式的,那麼應該使用ntddll.mak文件進行編譯,這樣編譯完成我們會得到四個與OpenSSL的API庫有關文件:ssleay32.lib,libeay32.lib,ssleay32.dll和libeay32.dll.執行的編譯命令形式如下:nmake -f ms\ntdll.mak
如果不希望以動態庫的形式使用OpenSSL,那麼可以使用nt.mak文件進行編譯.這樣編譯後使用OpenSSL的時候,回直接將代碼鏈接進我們的程序裡面.執行命令如下:nmake -f ms\nt.mak
bc:執行命令來完成代碼編譯:make -f ms\bcb.mak
四 ELSE
1)
測試動態庫:
nmake -f ms\ntdll.mak test
測試靜態庫:
nmake -f ms\nt.mak test

安裝動態庫:
nmake -f ms\ntdll.mak install
安裝靜態庫:
nmake -f ms\nt.mak install

清除上次動態庫的編譯,以便重新編譯:
nmake -f ms\ntdll.mak clean
清除上次靜態庫的編譯,以便重新編譯:
nmake -f ms\nt.mak clean

2)
使用OpenSSL
在VC中配置使用以上的函數庫:
點擊菜單:Tools -> Options,彈出對話框"Options",在該對話框中選擇"Directories"標簽。
在"Show directories for:"的"Include files"選項中新增目錄"C:\openssl\include";"Library files"選擇中新增目錄"C:\openssl\lib"。
然後在需要鏈接OpenSSL函數庫的工程中編譯時加入"libeay32.lib"就可以了。

❾ openssl怎麼編譯成動態庫

1、靜態編譯
./Configure linux-elf-arm -DB_ENDIAN linux:'armeb-linux-gcc -mbig-endian' --prefix=$(pwd)/OpenSSL
a、 將openssl-0.9.8d/crypto/bio/bss_file.c中以下代碼注釋掉
//#ifndef _FILE_OFFSET_BITS
//#define _FILE_OFFSET_BITS 64
//#endif
#endif
b、 報錯沒有timeb.h時,在報錯的.c文件中#undef TIMEB
c、 去掉openssl頂層Makefile中「build_all:」後面的 build_app build_test (我們要的只是兩個靜態庫libcrypto.a和libssl.a),並去掉」DIRS=」後面的app和tests。
make && make install

2、動態庫
1.config:
#config no-asm --prefix=../OpenSSL
2.改Makefile
1) CC= gcc 改成 CC = armeb-linux-gcc;
2) 刪除 CFLAG= 中的 「-march=pentium」;
3) AR=ar $(ARFLAGS) r 改為 AR=armeb-linux-ar $(ARFLAGS) r;
4) ARD=ar $(ARFLAGS) d 改為 ARD=armeb-linux-ar $(ARFLAGS) d;
5)RANLIB= /usr/bin/ranlib 改為 RANLIB= armeb-linux-ranlib;
3.編譯
#make
#make install

❿ crypto加密演算法庫支持哪些演算法

Crypto++ Library 是開源的、跨平台的C++, 提供豐富的加密解密演算法,包括:MD5,IDEA, Triple-DES,AES (Rijndael), RC6, MARS, Twofish, Serpent, RSA, DSA, SHA-1, SHA-2 等等。

支持的編譯器如下:
* MSVC 6.0 - 2010
* GCC 3.3 - 4.5
* C++Builder 2010
* Intel C++ Compiler 9 - 11.1
* Sun Studio 12u1, Express 11/08, Express 06/10

熱點內容
ubuntu編譯fortran 發布:2025-02-11 21:21:59 瀏覽:201
雲伺服器寬頻單位 發布:2025-02-11 20:48:11 瀏覽:538
安卓數據線公頭是哪個 發布:2025-02-11 20:45:42 瀏覽:812
網址原始密碼是什麼 發布:2025-02-11 20:33:52 瀏覽:72
怎麼創建伺服器我的世界網易 發布:2025-02-11 20:18:36 瀏覽:467
伺服器電腦與客戶端的連接 發布:2025-02-11 20:18:32 瀏覽:36
安卓哪個系統最流暢好用 發布:2025-02-11 20:17:44 瀏覽:879
蘋果平板安卓模擬器哪個好用 發布:2025-02-11 20:17:01 瀏覽:834
手機谷歌伺服器怎麼樣 發布:2025-02-11 20:08:37 瀏覽:221
編譯簡單游戲 發布:2025-02-11 20:02:10 瀏覽:866