@@ -2,6 +2,7 @@
#include "ListNode.h"
#include <string>
+#define nullptr 0x00
using namespace std;
// constructor with 0 parameters
@@ -168,4 +169,4 @@ void * List::remove_from_back(void)
ListNode * List::get_first(void)
{
return first_node;
-}
+}
@@ -1,4 +1,5 @@
ListNode::ListNode() :
@@ -43,4 +44,4 @@ void ListNode::set_next(ListNode * next)
ListNode * ListNode::get_next(void)
return this->next;
@@ -17,7 +17,7 @@ char pass[255] = {0};
uint16_t ID = 1050; // Device ID
uint16_t port = 9000;
-IPAddress server(192,168,30,1);
+IPAddress server(192,168,0,10);
WiFiClient wclient;
uint8_t aes_key[16] = {
@@ -0,0 +1,20 @@
+
+int hex2bin( const char *s )
+{
+ int ret=0;
+ int i;
+ for( i=0; i<2; i++ )
+ {
+ char c = *s++;
+ int n=0;
+ if( '0'<=c && c<='9' )
+ n = c-'0';
+ else if( 'a'<=c && c<='f' )
+ n = 10 + c-'a';
+ else if( 'A'<=c && c<='F' )
+ n = 10 + c-'A';
+ ret = n + ret*16;
+ }
+ return ret;
@@ -0,0 +1,17 @@
+#ifndef __ELEC0017_CRYPTO_H__
+#define __ELEC0017_CRYPTO_H__
+#ifdef __cplusplus
+extern "C"
+#endif
+int hex2bin(const char *hex);