On Sat, Oct 09, 2010 at 11:34:43PM -0400, Mimi Zohar wrote: > On Sat, 2010-10-09 at 09:29 +0800, Herbert Xu wrote: > > Mimi Zohar <zo...@linux.vnet.ibm.com> wrote: > > > Hi, > > > > > > Looking at different examples of the same crypto call, it's unclear > > > whether it only returns negative error values. Some examples only test > > > for negative values, while others test for not 0. tcrypt.c does "if > > > (ret)". Would appreciate some clarification. > > > > Unless the call can return positive values then it makes no > > difference. Which particular call are you talking about? > > > > Cheers, > > Just to name a few: crypto_hash_init(), crypto_hash_update(), > crypto_hash_final(). Also crypto_blkcipher_decrypt/encrypt(). Would be > nice to know definitively that they return < 0 on error and 0 for > success.
Yes it's zero or negative. Cheers, -- Email: Herbert Xu <herb...@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html