From: Ard Biesheuvel Date: Thu, 9 Apr 2015 10:55:35 +0000 (+0200) Subject: crypto: sha512 - implement base layer for SHA-512 X-Git-Tag: omap-for-v4.2/o2_dc~130^2~15 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b84a2a0b4ec214fc5d4ba1d3d5b26d4f88733dba;p=pandora-kernel.git crypto: sha512 - implement base layer for SHA-512 To reduce the number of copies of boilerplate code throughout the tree, this patch implements generic glue for the SHA-512 algorithm. This allows a specific arch or hardware implementation to only implement the special handling that it needs. The users need to supply an implementation of void (sha512_block_fn)(struct sha512_state *sst, u8 const *src, int blocks) and pass it to the SHA-512 base functions. For easy casting between the prototype above and existing block functions that take a 'u64 state[]' as their first argument, the 'state' member of struct sha512_state is moved to the base of the struct. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu --- Reading git-diff-tree failed