chap.c
Go to the documentation of this file.
00001 /*
00002  * CHAP-MD5 (RFC 1994)
00003  * Copyright (c) 2007-2009, Jouni Malinen <j@w1.fi>
00004  *
00005  * This program is free software; you can redistribute it and/or modify
00006  * it under the terms of the GNU General Public License version 2 as
00007  * published by the Free Software Foundation.
00008  *
00009  * Alternatively, this software may be distributed under the terms of BSD
00010  * license.
00011  *
00012  * See README and COPYING for more details.
00013  */
00014 
00015 #include "includes.h"
00016 
00017 #include "common.h"
00018 #include "crypto/crypto.h"
00019 #include "chap.h"
00020 
00021 int chap_md5(u8 id, const u8 *secret, size_t secret_len, const u8 *challenge,
00022               size_t challenge_len, u8 *response)
00023 {
00024         const u8 *addr[3];
00025         size_t len[3];
00026 
00027         addr[0] = &id;
00028         len[0] = 1;
00029         addr[1] = secret;
00030         len[1] = secret_len;
00031         addr[2] = challenge;
00032         len[2] = challenge_len;
00033         return md5_vector(3, addr, len, response);
00034 }


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