当前位置:首页 » 编程软件 » 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

热点内容
微信哪里能找到登陆游戏的密码 发布:2025-02-12 01:54:22 浏览:591
php获取服务器ip地址 发布:2025-02-12 01:54:12 浏览:578
对象存储和nas哪个好 发布:2025-02-12 01:50:34 浏览:445
phpmulticurl 发布:2025-02-12 01:41:58 浏览:70
数据库的集群 发布:2025-02-12 01:36:55 浏览:633
c语言实验买糖果 发布:2025-02-12 01:36:54 浏览:263
安卓怎么转微信到iphone 发布:2025-02-12 01:36:22 浏览:385
大众朗逸哪个配置好点 发布:2025-02-12 01:25:41 浏览:68
引用jar怎么发布到服务器 发布:2025-02-12 01:07:44 浏览:334
旧电脑开服务器 发布:2025-02-12 01:02:50 浏览:278