在Windows上使用curl / curl.h(curl/curl.h on Windows)
我的c ++脚本中有以下内容:
#include "curl/curl.h"
当我尝试编译它时,我收到以下错误:
\ Users \ username \ Desktop \ Temp \ talkbot \ main.cpp C:\ Users \ username \ Desktop \ Temp \ talkbot \ C curl.h:没有这样的文件或目录。
所以我四处搜索并尝试下载cURL for windows。 我最终登录http://www.paehl.com/open_source/?CURL_7.21.3并选择“不使用SSL下载”。 我下载了它,我只是得到了curl.exe。
我该怎么办这个文件来获取curl.h? 提前致谢。
I have the following in my c++ script:
#include "curl/curl.h"
When I try to compile it, I get the following error:
\Users\username\Desktop\Temp\talkbot\main.cpp C:\Users\username\Desktop\Temp\talkbot\C curl.h: No such file or directory.
So I searched around and tried to download cURL for windows. I ended up on http://www.paehl.com/open_source/?CURL_7.21.3 and choose Download without SSL. I downloaded it and I simply got curl.exe.
What am I supposed to do with that file to get curl.h? Thanks in advance.
原文:https://stackoverflow.com/questions/4530780
最满意答案
在第二个代码段中,您在已加密的字符串
str
上调用了crypt
。 因此,根据您的需要,要么不加密两次:local enc1 = {29, 58, 93, 28 ,27}; local str = "#c)*J}s-Mj!=[f3`7AfW{XCW*.EI!c0,i4Y:3Z~{"; print("Decryption: " .. crypt(crypted,enc1,true));
或解密两次:
local enc1 = {29, 58, 93, 28 ,27}; local str = "#c)*J}s-Mj!=[f3`7AfW{XCW*.EI!c0,i4Y:3Z~{"; local crypted = crypt(str,enc1) print("Decryption: " .. crypt(crypt(crypted,enc1,true), enc1, true))
In your second code snippet, you called
crypt
on the already encrypted stringstr
. So depending on what you want, either don't encrypt it twice:local enc1 = {29, 58, 93, 28 ,27}; local str = "#c)*J}s-Mj!=[f3`7AfW{XCW*.EI!c0,i4Y:3Z~{"; print("Decryption: " .. crypt(crypted,enc1,true));
Or decrypt it twice:
local enc1 = {29, 58, 93, 28 ,27}; local str = "#c)*J}s-Mj!=[f3`7AfW{XCW*.EI!c0,i4Y:3Z~{"; local crypted = crypt(str,enc1) print("Decryption: " .. crypt(crypt(crypted,enc1,true), enc1, true))
相关问答
更多-
好吧,不是算法本身 - 一旦你有了密钥,数据就会被解密。 但是有一些技术可以做到这一点,他们通常会转向以下之一: 软件混淆(你可以谷歌关键词,如“软件保护”),或 硬件攻击对策(例如查找“可信执行环境”),或 两者同时进行。 例如,当您在连接到HDMI电视的PC上观看Netflix电影时会发生这种情况:在非常简化的情况下,会发生的事情是电影是使用某个DRM密钥K1加密的,它会被K1解密在PC上,然后在通往电视的路上立即用新的HDCP密钥K2重新加密(然后电视将使用相同的HDCP密钥K2对其进行解密)。 与M ...
-
有必要将编码消息保持为二进制编码: fs.writeFileSync('ciphertext', encrypted, {encoding: 'binary'}); It is necessary to keep the coded message in the binary encoding: fs.writeFileSync('ciphertext', encrypted, {encoding: 'binary'});
-
解密加密文本(Decrypt an encrypted text)[2022-09-13]
DataEncryptor每个实例DataEncryptor生成新密钥。 您需要使用加密字符串的相同密钥进行解密。 如果在同一进程中完成此操作,则保留对DataEncryptor key的引用。 否则,您需要使用DataEncryptor(byte[] key, byte[] iv)构造函数进行初始化。 尝试这样的代码: class Program { static void Main(string[] args) { string key, iv; var ... -
这里的一切都是正确的。 但。 在您的示例中,必须使用AES- 256 -ECB。 这里是可运行的代码: require "openssl" require "digest" require "uri" require "base64" data = 'T353/s48iKzAf61b2dCOnqUApYa4xxjye8he4oAtJHyyCKl8sCbI33hfP6IqOsQZEIWeQBCsvy97xwJMPD8RwLG4J0wgX9Ihlti1vMar+5nrLrCR4lAfZcoJopoBt1JVn ...
-
找到可能的答案: “默认情况下,Java Ciphers(至少在Sun的实现中)是在所谓的电子密码本(ECB)模式下构建的。” (来源: http : //www.javamex.com/tutorials/cryptography/block_modes.shtml ) 因此,如果默认使用ECB,我想这意味着没有初始化向量,我可以使用OpenSSL中的以下方法: void AES_ecb_encrypt(*in, *out, *key, enc); 使用AES_decrypt()我可以解密源自Java端 ...
-
lua解剖器解密包(Decrypt packet in lua dissector)[2023-09-17]
我个人使用lua-crypto,但它需要OpenSSL。 你可以查看lua-wiki 。 最近我为这个名为bgcrypto的 AES实现创建了包装器。 它没有外部依赖,但我真的不在实际工作中使用它。 Personally i use lua-crypto but it requires OpenSSL. You can check lua-wiki. Recently i create wrapper for this AES implementation called bgcrypto. It has n ... -
在第二个代码段中,您在已加密的字符串str上调用了crypt 。 因此,根据您的需要,要么不加密两次: local enc1 = {29, 58, 93, 28 ,27}; local str = "#c)*J}s-Mj!=[f3`7AfW{XCW*.EI!c0,i4Y:3Z~{"; print("Decryption: " .. crypt(crypted,enc1,true)); 或解密两次: local enc1 = {29, 58, 93, 28 ,27}; local str = "#c)*J} ...
-
无法解密RSA加密密钥(Cannot Decrypt RSA encrypted Key)[2022-12-06]
//byte[] ciphertext = utf8.GetBytes(filetest.Text); byte[] ciphertext = Convert.FromBase64String(filetest.Text); //byte[] ciphertext = utf8.GetBytes(filetest.Text); byte[] ciphertext = Convert.FromBase64String(filetest.Text); -
加密/解密数据php(Encrypted/Decrypted data php)[2022-10-12]
问题是这样的 //for decrypt almost the same thing $password = $_POST['password']; $crypt->setData($password); $decrypted = $crypt->decrypt(); 您正在设置数据以解密原始密码,而不是您需要传递密码加密的数据 $crypt->setData($encrypted); $decrypted = $crypt->decrypt(); 问候 The problem ... -
在服务器(PHP)上加密并在客户端(Lua)上解密的最佳方法?(Best way to encrypt on a server (PHP), and decrypt on the client (Lua)?)[2022-06-07]
使用AES(或类似的对称算法)进行加密。 Lua中的AES可用作外部库(即aeslua )。 在PHP中,您可以使用mcrypt库。 Use AES (or a similar symetric algorithm) for encryption. AES in Lua is available as an external library(i.e. aeslua). In PHP you could use the mcrypt library.