]> git.sesse.net Git - bcachefs-tools-debian/blob - c_src/include/linux/crypto.h
rust: bump rpassword to v7.x
[bcachefs-tools-debian] / c_src / include / linux / crypto.h
1 /*
2  * Scatterlist Cryptographic API.
3  *
4  * Copyright (c) 2002 James Morris <jmorris@intercode.com.au>
5  * Copyright (c) 2002 David S. Miller (davem@redhat.com)
6  * Copyright (c) 2005 Herbert Xu <herbert@gondor.apana.org.au>
7  *
8  * Portions derived from Cryptoapi, by Alexander Kjeldaas <astor@fast.no>
9  * and Nettle, by Niels Möller.
10  * 
11  * This program is free software; you can redistribute it and/or modify it
12  * under the terms of the GNU General Public License as published by the Free
13  * Software Foundation; either version 2 of the License, or (at your option) 
14  * any later version.
15  *
16  */
17 #ifndef _LINUX_CRYPTO_H
18 #define _LINUX_CRYPTO_H
19
20 #include <linux/kernel.h>
21 #include <linux/list.h>
22 #include <linux/slab.h>
23
24 #define CRYPTO_MINALIGN ARCH_KMALLOC_MINALIGN
25 #define CRYPTO_MINALIGN_ATTR __attribute__ ((__aligned__(CRYPTO_MINALIGN)))
26
27 struct crypto_type;
28
29 struct crypto_alg {
30         struct list_head        cra_list;
31
32         const char              *cra_name;
33         const struct crypto_type *cra_type;
34
35         void *                  (*alloc_tfm)(void);
36 } CRYPTO_MINALIGN_ATTR;
37
38 int crypto_register_alg(struct crypto_alg *alg);
39
40 struct crypto_tfm {
41         struct crypto_alg       *alg;
42 };
43
44 #endif  /* _LINUX_CRYPTO_H */
45