18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */ 28c2ecf20Sopenharmony_ci 38c2ecf20Sopenharmony_ci#ifndef _AEAD_API_H 48c2ecf20Sopenharmony_ci#define _AEAD_API_H 58c2ecf20Sopenharmony_ci 68c2ecf20Sopenharmony_ci#include <crypto/aead.h> 78c2ecf20Sopenharmony_ci#include <linux/crypto.h> 88c2ecf20Sopenharmony_ci 98c2ecf20Sopenharmony_cistruct crypto_aead * 108c2ecf20Sopenharmony_ciaead_key_setup_encrypt(const char *alg, const u8 key[], 118c2ecf20Sopenharmony_ci size_t key_len, size_t mic_len); 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_ciint aead_encrypt(struct crypto_aead *tfm, u8 *b_0, u8 *aad, 148c2ecf20Sopenharmony_ci size_t aad_len, u8 *data, 158c2ecf20Sopenharmony_ci size_t data_len, u8 *mic); 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_ciint aead_decrypt(struct crypto_aead *tfm, u8 *b_0, u8 *aad, 188c2ecf20Sopenharmony_ci size_t aad_len, u8 *data, 198c2ecf20Sopenharmony_ci size_t data_len, u8 *mic); 208c2ecf20Sopenharmony_ci 218c2ecf20Sopenharmony_civoid aead_key_free(struct crypto_aead *tfm); 228c2ecf20Sopenharmony_ci 238c2ecf20Sopenharmony_ci#endif /* _AEAD_API_H */ 24