Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 
0003 #ifndef _AEAD_API_H
0004 #define _AEAD_API_H
0005 
0006 #include <crypto/aead.h>
0007 #include <linux/crypto.h>
0008 
0009 struct crypto_aead *
0010 aead_key_setup_encrypt(const char *alg, const u8 key[],
0011                size_t key_len, size_t mic_len);
0012 
0013 int aead_encrypt(struct crypto_aead *tfm, u8 *b_0, u8 *aad,
0014          size_t aad_len, u8 *data,
0015          size_t data_len, u8 *mic);
0016 
0017 int aead_decrypt(struct crypto_aead *tfm, u8 *b_0, u8 *aad,
0018          size_t aad_len, u8 *data,
0019          size_t data_len, u8 *mic);
0020 
0021 void aead_key_free(struct crypto_aead *tfm);
0022 
0023 #endif /* _AEAD_API_H */