On Thu, Jul 06, 2006 at 04:58:55PM +0200, Johannes Berg wrote:
> On Thu, 2006-07-06 at 15:45 +0200, Martin Langer wrote:
>
> > + tfm = crypto_alloc_tfm("md5", 0);
> > + if (tfm == NULL)
> > + return -1;
>
> That's all fine and dandy, but how about including a Kconfig option
> instead that makes it rely on the md5sum code?
Yeah, but I'm still not sure if md5 is good, sha1 is better or ... is
the best (fastest, best results, ...).
>
> > + crypto_digest_init(tfm);
> > + crypto_digest_update(tfm, sg, 1);
> > + crypto_digest_final(tfm, signature);
> > + crypto_free_tfm(tfm);
>
> None of these functions can return an error?
Never believe Documentation/crypto/api... I will check it.
> I also don't like your handling of the struct scatterlist. IMHO you
> should only declare one
> struct scatterlist sg;
>
> and use &sg, instead of sg_set_buf you should use sg_init_one, and
> change the following:
> crypto_digest_update(tfm, sg, 1);
> to
> crypto_digest_update(tfm, &sg, 1);
ok.
Martin
_______________________________________________
Bcm43xx-dev mailing list
[email protected]
http://lists.berlios.de/mailman/listinfo/bcm43xx-dev