]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - include/crypto/internal/hash.h
crypto: ahash - Add unaligned handling and default operations
[mirror_ubuntu-bionic-kernel.git] / include / crypto / internal / hash.h
index 179dd8fdfa14bf9dccfcfc482e9da44483e56899..5bfad8c8059580d9668c72e9acf9f056f24b928c 100644 (file)
@@ -59,6 +59,11 @@ int crypto_hash_walk_first_compat(struct hash_desc *hdesc,
                                  struct crypto_hash_walk *walk,
                                  struct scatterlist *sg, unsigned int len);
 
+static inline int crypto_hash_walk_last(struct crypto_hash_walk *walk)
+{
+       return !(walk->entrylen | walk->total);
+}
+
 int crypto_register_ahash(struct ahash_alg *alg);
 int crypto_unregister_ahash(struct ahash_alg *alg);
 int ahash_register_instance(struct crypto_template *tmpl,
@@ -94,6 +99,7 @@ static inline void crypto_drop_shash(struct crypto_shash_spawn *spawn)
 struct shash_alg *shash_attr_alg(struct rtattr *rta, u32 type, u32 mask);
 
 int shash_ahash_update(struct ahash_request *req, struct shash_desc *desc);
+int shash_ahash_finup(struct ahash_request *req, struct shash_desc *desc);
 int shash_ahash_digest(struct ahash_request *req, struct shash_desc *desc);
 
 int crypto_init_shash_ops_async(struct crypto_tfm *tfm);