Ah, I see now. I wasn't actually using a key of zero length, it's just that in 
this case, it was a key of length 20, and since Rijndael needs a keylength of 
16, 24 or 32, it was raising the exception. I hadn't actually gotten around 
to coding the exception catching yet, I was just working out the bigger 
scheme first.

Using a keylength of 16 works, though. In the past, I checked all keys to make 
sure they were within the bounds available for each cipher, which I hadn't 
done yet for this new code.

Thanks for the help. I appreciate the work you've done on Crypto++, it's a 
great library.

J


On October 8, 2002 06:42 pm, Wei Dai wrote:
> You're using a key of zero length, which is not valid for AES. The cipher
> object will throw an exception, and since you're not catching it, the
> program terminates. Please do provide backtraces in the future.
>

Reply via email to