GSwifiInterface library (interface for GainSpan Wi-Fi GS1011 modules) Please see https://mbed.org/users/gsfan/notebook/GSwifiInterface/

Dependents:   GSwifiInterface_HelloWorld GSwifiInterface_HelloServo GSwifiInterface_UDPEchoServer GSwifiInterface_UDPEchoClient ... more

Fork of WiflyInterface by mbed official

GainSpan Wi-Fi library

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

mbed RTOS supported.

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

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

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

mbed RTOS に対応しています。(mbed2.0)

Committer:
gsfan
Date:
Tue Sep 24 06:24:37 2019 +0000
Revision:
22:d25a5a0d2497
Parent:
12:057089026a20
UART Command and SPI Data supported.; bug fix.;

Who changed what in which revision?

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