Home » Developing U++ » External resources » Cripto with Botan
Re: Cripto with Botan [message #22405 is a reply to message #22386] |
Fri, 10 July 2009 15:37 |
Ruimg
Messages: 10 Registered: July 2009
|
Promising Member |
|
|
Botan VS Crypto++[ 3 votes ] |
1. |
Botan of course |
1 / 33% |
2. |
Crypto++ Rules |
2 / 67% |
New post for new botan upp project.
Now Compiles with VC9 and MingW.
Before changing compiler you must run the configure.pl script, I tried to automate this or make some adjustments to the project with no success.
So, for Microsoft Visual Studio compiler run
perl configure.pl -cc msvc
For Mingw GCC (in my case I have to disable TR1 so)
perl configure.pl -cc gcc --with-tr1=none
Either MSVC and Mingw compilation gives me a lot of warnings
I'm using Ultimate++ build 1393 witch adds some interesting options like internal includes.
So I changed my project file, no more /I compiler options.
Some test code
#include <botan/botan.h>
#include <botan/pbkdf2.h>
#include <botan/hmac.h>
#include <botan/sha160.h>
...
void DoBotan()
{
using namespace Botan;
try{
LibraryInitializer init;
AutoSeeded_RNG rng;
std::auto_ptr<S2K> s2k(get_s2k("PBKDF2(SHA-1)"));
s2k->set_iterations(8192);
s2k->new_random_salt(rng, 8);
SymmetricKey key = s2k->derive_key(16, "TEST");
std::string alg = "AES/CBC/PKCS7";
Pipe enc(get_cipher(alg, key, ENCRYPTION), new Hex_Encoder);
Pipe dec(new Hex_Decoder, get_cipher(alg, key, DECRYPTION));
String secret = ToUtf8(txtIn.GetText());
enc.process_msg(secret);
String cipher = enc.read_all_as_string();
dec.process_msg(cipher);
String bubu = dec.read_all_as_string();
PromptOK(bubu);
}
catch (std::exception se)
{
String err;
err << "Error \n" << se.what();
PromptOK(err);
}
}
Assist++ is still a bit broken try to list the enc variable methods for example, many are missing.
Created a poll to spice discussion.
Next is to create a simple Botan Wrapper
-
Attachment: Botan.upp
(Size: 13.08KB, Downloaded 644 times)
[Updated on: Fri, 10 July 2009 15:38] Report message to a moderator
|
|
|
|
|
Cripto with Botan
By: Ruimg on Thu, 02 July 2009 12:10
|
|
|
Re: Cripto with Botan
By: koldo on Thu, 02 July 2009 23:50
|
|
|
Re: Cripto with Botan
By: Ruimg on Fri, 03 July 2009 18:59
|
|
|
Re: Cripto with Botan
By: koldo on Fri, 03 July 2009 21:33
|
|
|
Re: Cripto with Botan
By: Ruimg on Thu, 09 July 2009 17:38
|
|
|
Re: Cripto with Botan
By: Ruimg on Thu, 09 July 2009 17:44
|
|
|
Re: Cripto with Botan
By: Ruimg on Fri, 10 July 2009 15:37
|
|
|
Re: Cripto with Botan
By: koldo on Mon, 13 July 2009 15:55
|
|
|
Re: Cripto with Botan
|
|
|
Re: Cripto with Botan
By: Ruimg on Mon, 13 July 2009 19:41
|
|
|
Re: Cripto with Botan
By: koldo on Tue, 14 July 2009 00:21
|
|
|
Re: Cripto with Botan
By: koldo on Thu, 30 July 2009 08:42
|
|
|
Re: Cripto with Crypto++
By: Ruimg on Thu, 17 September 2009 20:41
|
|
|
Re: Cripto with Crypto++
By: Ruimg on Mon, 21 September 2009 18:15
|
|
|
Re: Cripto with CryptoPP
By: Ruimg on Tue, 29 September 2009 16:40
|
|
|
Re: Cripto with CryptoPP
By: koldo on Sat, 18 February 2012 21:06
|
Goto Forum:
Current Time: Fri Apr 19 21:09:42 CEST 2024
Total time taken to generate the page: 0.03554 seconds
|