2010-11-23 14:34:07

by Mimi Zohar

[permalink] [raw]
Subject: crypto_shash_digest API

Hi!

Am having problems finding any shash API documentation. Could someone
tell me if 'out' needs to be zeroed before calling crypto_shash_digest?

int crypto_shash_digest(struct shash_desc *desc, const u8 *data,
unsigned int len, u8 *out)

thanks,

Mimi


2010-11-23 14:42:45

by Herbert Xu

[permalink] [raw]
Subject: Re: crypto_shash_digest API

On Tue, Nov 23, 2010 at 09:34:01AM -0500, Mimi Zohar wrote:
> Hi!
>
> Am having problems finding any shash API documentation. Could someone
> tell me if 'out' needs to be zeroed before calling crypto_shash_digest?
>
> int crypto_shash_digest(struct shash_desc *desc, const u8 *data,
> unsigned int len, u8 *out)

No, out will be filled with the crypto_shash_digestsize bytes
if crypto_shash_digest returns zero.

Cheers,
--
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt