On Friday, 25 April 2014 at 19:06:33 UTC, brad clawsie wrote:
My code compiles and fails silently.
How do you want it to fail? C code doesn't throw exceptions.
AES_set_decrypt_key is needed before AES_decrypt.
AES_set_decrypt_key(chunk.ptr, 128, &wctx);
Justin Whear:
brad clawsie:
b = cast(ubyte[]) s;
Better to use std.string.representation.
It doesn't look like you're allocating space for `e` or `d`,
e.g. `auto e
= new ubyte[](256);`, so those arrays have a length of 0, in
which case
the encrypt/decrypt functions are just trashing
On Fri, 25 Apr 2014 19:06:31 +, brad clawsie wrote:
> hi everyone.
>
> I'm trying to symmetrically encrypt some text using the openssl
> bindings. My code compiles and fails silently. Clearly there is
> something very wrong with it - it could be my novice D skills, or my
> misuse of the opens
hi everyone.
I'm trying to symmetrically encrypt some text using the openssl
bindings. My code compiles and fails silently. Clearly there is
something very wrong with it - it could be my novice D skills, or
my misuse of the openssl binding.
auto chunk = new ubyte[](16);
foreach(ref x