Port of TI's CC3100 Websock camera demo. Using FreeRTOS, mbedTLS, also parts of Arducam for cams ov5642 and 0v2640. Can also use MT9D111. Work in progress. Be warned some parts maybe a bit flacky. This is for Seeed Arch max only, for an M3, see the demo for CM3 using the 0v5642 aducam mini.
sha1_gen.h
00001 //***************************************************************************** 00002 // Copyright (C) 2014 Texas Instruments Incorporated 00003 // 00004 // All rights reserved. Property of Texas Instruments Incorporated. 00005 // Restricted rights to use, duplicate or disclose this code are 00006 // granted through contract. 00007 // The program may not be used without the written permission of 00008 // Texas Instruments Incorporated or against the terms and conditions 00009 // stipulated in the agreement under which this program has been supplied, 00010 // and under no circumstances can it be used with non-TI connectivity device. 00011 // 00012 //***************************************************************************** 00013 00014 #ifndef __SHA1__ 00015 #define __SHA1__ 00016 00017 /** 00018 * @defgroup sha1 00019 * 00020 * @{ 00021 */ 00022 00023 #ifdef __cplusplus 00024 extern "C" { 00025 #endif 00026 00027 #define SHAMD5_MODE_ALGO_MD5 0x00000000 // MD5 00028 #define SHAMD5_MODE_ALGO_SHA1 0x00000002 // SHA-1 00029 #define SHAMD5_MODE_ALGO_SHA224 0x00000004 // SHA-224 00030 #define SHAMD5_MODE_ALGO_SHA256 0x00000006 // SHA-256 00031 00032 //***************************************************************************** 00033 // 00034 // The following defines are used to specify the algorithm in use in the 00035 // SHA/MD5 module. 00036 // 00037 //***************************************************************************** 00038 #define SHAMD5_ALGO_MD5 0x00000018 // MD5 00039 #define SHAMD5_ALGO_SHA1 0x0000001a // SHA-1 00040 #define SHAMD5_ALGO_SHA224 0x0000001c // SHA-224 00041 #define SHAMD5_ALGO_SHA256 0x0000001e // SHA-256 00042 #define SHAMD5_ALGO_HMAC_MD5 0x00000000 // HMAC-MD5 00043 #define SHAMD5_ALGO_HMAC_SHA1 0x00000002 // HMAC-SHA-1 00044 #define SHAMD5_ALGO_HMAC_SHA224 0x00000004 // HMAC-SHA-224 00045 #define SHAMD5_ALGO_HMAC_SHA256 0x00000006 // HMAC-SHA-256 00046 00047 int SHA1(unsigned char *puiInData,unsigned char *puiOutData); 00048 void ConvertToBase64(char *pcOutStr, const char *pccInStr, int iLen); 00049 00050 /// @} 00051 #ifdef __cplusplus 00052 } 00053 #endif /* __cplusplus */ 00054 #endif 00055
Generated on Tue Jul 12 2022 22:22:38 by
1.7.2