aes-encblock.c
Go to the documentation of this file.
00001 /*
00002  * AES encrypt_block
00003  *
00004  * Copyright (c) 2003-2007, Jouni Malinen <j@w1.fi>
00005  *
00006  * This program is free software; you can redistribute it and/or modify
00007  * it under the terms of the GNU General Public License version 2 as
00008  * published by the Free Software Foundation.
00009  *
00010  * Alternatively, this software may be distributed under the terms of BSD
00011  * license.
00012  *
00013  * See README and COPYING for more details.
00014  */
00015 
00016 #include "includes.h"
00017 
00018 #include "common.h"
00019 #include "aes.h"
00020 #include "aes_wrap.h"
00021 
00029 int aes_128_encrypt_block(const u8 *key, const u8 *in, u8 *out)
00030 {
00031         void *ctx;
00032         ctx = aes_encrypt_init(key, 16);
00033         if (ctx == NULL)
00034                 return -1;
00035         aes_encrypt(ctx, in, out);
00036         aes_encrypt_deinit(ctx);
00037         return 0;
00038 }


wpa_supplicant
Author(s): Package maintained by Blaise Gassend
autogenerated on Thu Apr 24 2014 15:34:33