blob: 5410c368e90e4f84d63dd6c4fde6235078633aae [file] [log] [blame]
Neels Hofmeyr17518fe2017-06-20 04:35:06 +02001/*! \file aes.h
2 * AES functions */
Harald Welte781bd5d2011-12-06 22:23:52 +01003/*
Harald Welte781bd5d2011-12-06 22:23:52 +01004 * Copyright (c) 2003-2006, Jouni Malinen <j@w1.fi>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * Alternatively, this software may be distributed under the terms of BSD
11 * license.
12 *
Harald Weltee08da972017-11-13 01:00:26 +090013 * SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
14 *
Harald Welte781bd5d2011-12-06 22:23:52 +010015 * See README and COPYING for more details.
16 */
17
Sylvain Munaut12ba7782014-06-16 10:13:40 +020018#pragma once
Harald Welte781bd5d2011-12-06 22:23:52 +010019
20#define AES_BLOCK_SIZE 16
21
22void * aes_encrypt_init(const u8 *key, size_t len);
23void aes_encrypt(void *ctx, const u8 *plain, u8 *crypt);
24void aes_encrypt_deinit(void *ctx);
25void * aes_decrypt_init(const u8 *key, size_t len);
26void aes_decrypt(void *ctx, const u8 *crypt, u8 *plain);
27void aes_decrypt_deinit(void *ctx);