Central Heating controller using the real time clock, PHY module for internet, 1-wire interface for temperature sensors, a system log and a configuration file
Dependencies: net 1-wire lpc1768 crypto clock web fram log
/media/uploads/andrewboyson/heating.sch
/media/uploads/andrewboyson/heating.brd
/media/uploads/andrewboyson/eagle.epf
Diff: web-this/system/web-system-html.c
- Revision:
- 67:2d379b0c5f05
- Parent:
- 64:c736b8924574
- Child:
- 68:19c5efffc900
--- a/web-this/system/web-system-html.c Fri Jul 19 17:52:12 2019 +0000 +++ b/web-this/system/web-system-html.c Thu Jul 25 21:17:40 2019 +0000 @@ -1,9 +1,13 @@ #include <stdio.h> +#include <string.h> #include "http.h" #include "web-nav-this.h" #include "web-add.h" +#include "log.h" #include "bignum.h" +#include "sha-256.h" +#include "hmac-sha-256.h" void WebSystemHtml() { @@ -26,6 +30,23 @@ WebAddH2("Compiler"); WebAddLabelledInt("Version Vvvbbbb", __ARMCC_VERSION); + WebAddH2("SHA 256 test"); + char hash[32]; + char* input = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"; + Sha256(input, strlen(input), hash); + HttpAddText("<code>"); + HttpAddBytesAsHex(hash, sizeof(hash)); + HttpAddText("</code>"); + + WebAddH2("HMAC SHA 256 test"); + char* key = "Jefe"; + char* msg = "what do ya want for nothing?"; + char mac[32]; + HmacSha256(key, strlen(key), msg, strlen(msg), mac); + HttpAddText("<code>"); + HttpAddBytesAsHex(mac, sizeof(mac)); + HttpAddText("</code>"); + WebAddH2("Big num test"); char* n =