Subject: | Confusing length error messages |
Date: | Mon, 26 May 2014 22:35:00 +0200 |
To: | bug-Crypt-Sodium [...] rt.cpan.org |
From: | "Steinar H. Gunderson" <sgunderson [...] bigfoot.com> |
Hi,
I'm trying to use crypto_box, and I get error messages like
[fatal]: nonce must be exactly 32 bytes long.
It turns out, from the code, that the check is actually on the public key,
so it shouldn't say nonce at all.
Furthermore, when there are two keys passed in (public and secret key),
it should really say “public key” instead of just “key”.
Last, it's a bit scary that when something dies and the web framework I'm
using sends me a backtrace, it includes all keys since they are function
arguments and you're using die() in there. Is there any way to work around
that, short of filtering the backtraces myself?
/* Steinar */
--
Homepage: http://www.sesse.net/