From ab5b2c35e143a87483700ca92d7fd50292a891d0 Mon Sep 17 00:00:00 2001 From: Jean-Christophe PLAGNIOL-VILLARD Date: Wed, 25 Mar 2015 12:56:14 +0100 Subject: crypto: prepare to allow multiple digest driver This will allow to have hw driver or asm optimised driver. Use a priority level to determine which one to use at runtime. The generic one will be 0. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD Signed-off-by: Sascha Hauer --- include/crypto/internal.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 include/crypto/internal.h (limited to 'include/crypto') diff --git a/include/crypto/internal.h b/include/crypto/internal.h new file mode 100644 index 0000000000..c6f5908ea0 --- /dev/null +++ b/include/crypto/internal.h @@ -0,0 +1,19 @@ +/* + * (C) Copyright 2015 Jean-Christophe PLAGNIOL-VILLARD + * + * GPL v2 only + */ + +#ifdef CONFIG_DIGEST_HMAC +int digest_hmac_register(struct digest_algo *algo, unsigned int pad_length); +#else +static inline int digest_hmac_register(struct digest_algo *algo, + unsigned int pad_length) +{ + return 0; +} +#endif + +int digest_generic_verify(struct digest *d, const unsigned char *md); +int digest_generic_digest(struct digest *d, const void *data, + unsigned int len, u8 *out); -- cgit v1.2.3