root/modules/eyefi.h

/* [<][>][^][v][top][bottom][index][help] */

INCLUDED FROM


   1 /*
   2 * Based on work by Dave Hansen <dave@sr71.net>
   3 * original licensing:
   4 * This software may be redistributed and/or modified under the terms of
   5  * the GNU General Public License ("GPL") version 2 as published by the
   6  * Free Software Foundation.
   7  */
   8 #ifndef EYEFI_H
   9 #define EYEFI_H
  10 
  11 #include <stddef.h>
  12 #include <stdlib.h>
  13 
  14 //-------------------------------------------------------------------
  15 // SHA1 / MD5 stuff
  16 
  17 typedef unsigned int u32;
  18 typedef unsigned short u16;
  19 typedef unsigned char u8;
  20 
  21 //little endian
  22 #define host_to_be32(n) __builtin_bswap32(n)
  23 
  24 #define os_memset memset
  25 #define os_memcpy memcpy
  26 #define os_strlen strlen
  27 #define os_strcpy strcpy
  28 
  29 #define SHA1_MAC_LEN 20
  30 #define MD5_MAC_LEN 16
  31 void md5_vector(size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac);
  32 void hmac_md5_vector(const u8 *key, size_t key_len, size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac);
  33 void hmac_md5(const u8 *key, size_t key_len, const u8 *data, size_t data_len, u8 *mac);
  34 void pbkdf2_sha1(const char *passphrase, const char *ssid, size_t ssid_len, int iterations, u8 *buf, size_t buflen);
  35 
  36 //-------------------------------------------------------------------
  37 #endif

/* [<][>][^][v][top][bottom][index][help] */