GainSpan Wi-Fi library see: http://mbed.org/users/gsfan/notebook/gainspan_wifi/

Dependents:   GSwifi_httpd GSwifi_websocket GSwifi_tcpclient GSwifi_tcpserver ... more

Fork of GSwifi by gs fan

GainSpan Wi-Fi library

The GS1011 is an ultra low power 802.11b wireless module from GainSpan.

see: http://mbed.org/users/gsfan/notebook/gainspan_wifi/

/media/uploads/gsfan/gs_im_002.jpg /media/uploads/gsfan/gs1011m_2.jpg

ゲインスパン Wi-Fi モジュール ライブラリ

ゲインスパン社の低電力 Wi-Fiモジュール(無線LAN) GS1011 シリーズ用のライブラリです。

解説: http://mbed.org/users/gsfan/notebook/gainspan_wifi/

Committer:
gsfan
Date:
Wed Dec 18 01:29:43 2013 +0000
Revision:
43:0b5e2727e020
Parent:
23:a783c62c36d0
fix reconnect

Who changed what in which revision?

UserRevisionLine numberNew contents of line
gsfan 23:a783c62c36d0 1 /*
gsfan 23:a783c62c36d0 2 * source from http://www.ipa.go.jp/security/rfc/RFC3174JA.html
gsfan 23:a783c62c36d0 3 */
gsfan 23:a783c62c36d0 4 /*
gsfan 23:a783c62c36d0 5 * sha1.h
gsfan 23:a783c62c36d0 6 *
gsfan 23:a783c62c36d0 7 * Description:
gsfan 23:a783c62c36d0 8 * This is the header file for code which implements the Secure
gsfan 23:a783c62c36d0 9 * Hashing Algorithm 1 as defined in FIPS PUB 180-1 published
gsfan 23:a783c62c36d0 10 * April 17, 1995.
gsfan 23:a783c62c36d0 11 *
gsfan 23:a783c62c36d0 12 * Many of the variable names in this code, especially the
gsfan 23:a783c62c36d0 13 * single character names, were used because those were the names
gsfan 23:a783c62c36d0 14 * used in the publication.
gsfan 23:a783c62c36d0 15 *
gsfan 23:a783c62c36d0 16 * Please read the file sha1.c for more information.
gsfan 23:a783c62c36d0 17 *
gsfan 23:a783c62c36d0 18 */
gsfan 23:a783c62c36d0 19
gsfan 23:a783c62c36d0 20 #ifndef _SHA1_H_
gsfan 23:a783c62c36d0 21 #define _SHA1_H_
gsfan 23:a783c62c36d0 22
gsfan 23:a783c62c36d0 23 #include "mbed.h"
gsfan 23:a783c62c36d0 24 /*
gsfan 23:a783c62c36d0 25 * If you do not have the ISO standard stdint.h header file, then you
gsfan 23:a783c62c36d0 26 * must typdef the following:
gsfan 23:a783c62c36d0 27 * name meaning
gsfan 23:a783c62c36d0 28 * uint32_t unsigned 32 bit integer
gsfan 23:a783c62c36d0 29 * uint8_t unsigned 8 bit integer (i.e., unsigned char)
gsfan 23:a783c62c36d0 30 * int_least16_t integer of >= 16 bits
gsfan 23:a783c62c36d0 31 *
gsfan 23:a783c62c36d0 32 */
gsfan 23:a783c62c36d0 33
gsfan 23:a783c62c36d0 34 #ifndef _SHA_enum_
gsfan 23:a783c62c36d0 35 #define _SHA_enum_
gsfan 23:a783c62c36d0 36 enum
gsfan 23:a783c62c36d0 37 {
gsfan 23:a783c62c36d0 38 shaSuccess = 0,
gsfan 23:a783c62c36d0 39 shaNull, /* Null pointer parameter */
gsfan 23:a783c62c36d0 40 shaInputTooLong, /* input data too long */
gsfan 23:a783c62c36d0 41 shaStateError /* called Input after Result */
gsfan 23:a783c62c36d0 42 };
gsfan 23:a783c62c36d0 43 #endif
gsfan 23:a783c62c36d0 44 #define SHA1HashSize 20
gsfan 23:a783c62c36d0 45
gsfan 23:a783c62c36d0 46 /*
gsfan 23:a783c62c36d0 47 * This structure will hold context information for the SHA-1
gsfan 23:a783c62c36d0 48 * hashing operation
gsfan 23:a783c62c36d0 49 */
gsfan 23:a783c62c36d0 50 typedef struct SHA1Context
gsfan 23:a783c62c36d0 51 {
gsfan 23:a783c62c36d0 52 uint32_t Intermediate_Hash[SHA1HashSize/4]; /* Message Digest */
gsfan 23:a783c62c36d0 53
gsfan 23:a783c62c36d0 54 uint32_t Length_Low; /* Message length in bits */
gsfan 23:a783c62c36d0 55 uint32_t Length_High; /* Message length in bits */
gsfan 23:a783c62c36d0 56
gsfan 23:a783c62c36d0 57 /* Index into message block array */
gsfan 23:a783c62c36d0 58 int_least16_t Message_Block_Index;
gsfan 23:a783c62c36d0 59 uint8_t Message_Block[64]; /* 512-bit message blocks */
gsfan 23:a783c62c36d0 60
gsfan 23:a783c62c36d0 61 int Computed; /* Is the digest computed? */
gsfan 23:a783c62c36d0 62 int Corrupted; /* Is the message digest corrupted? */
gsfan 23:a783c62c36d0 63 } SHA1Context;
gsfan 23:a783c62c36d0 64
gsfan 23:a783c62c36d0 65 /*
gsfan 23:a783c62c36d0 66 * Function Prototypes
gsfan 23:a783c62c36d0 67 */
gsfan 23:a783c62c36d0 68
gsfan 23:a783c62c36d0 69 int SHA1Reset( SHA1Context *);
gsfan 23:a783c62c36d0 70 int SHA1Input( SHA1Context *,
gsfan 23:a783c62c36d0 71 const uint8_t *,
gsfan 23:a783c62c36d0 72 unsigned int);
gsfan 23:a783c62c36d0 73 int SHA1Result( SHA1Context *,
gsfan 23:a783c62c36d0 74 uint8_t Message_Digest[SHA1HashSize]);
gsfan 23:a783c62c36d0 75
gsfan 23:a783c62c36d0 76
gsfan 23:a783c62c36d0 77 void sha1 (const char *input, int len, char *output);
gsfan 23:a783c62c36d0 78 #endif