Skip to content

Web server simplifications and handers #7429

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 29 commits into from
Jan 16, 2024
Merged
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
15141be
First stab ad simplyfing webserver auth and adding a handler.
dirkx Oct 29, 2022
0b4cf21
Merge branch 'espressif:master' into WebServerSimplificationsAndHanders
dirkx Nov 4, 2022
df0c189
Tweaks after testing against docs and latest Library tree
dirkx Nov 4, 2022
09a982e
Add documentatin for callback handler
dirkx Nov 4, 2022
15f4da7
Bodge to allow things to compile without the dependencies
dirkx Nov 4, 2022
48814ad
Remove dependency on sodium to make it compile with 4.4
dirkx Nov 4, 2022
f1282fc
Fix hex conversion
dirkx Nov 4, 2022
30b08d6
Move some common HEX functions into a static HEX class, remove those …
dirkx Nov 5, 2022
38b0778
Remove some duplicated code
dirkx Nov 5, 2022
6ca0c7d
Add simplfiied HEXBuilder under MD5Bulder to CMakefile.
dirkx Nov 5, 2022
a8265c3
Merge branch 'master' into WebServerSimplificationsAndHanders
dirkx Nov 9, 2022
524c017
Merge branch 'master' into WebServerSimplificationsAndHanders
SuGlider Dec 16, 2022
50200e3
Merge branch 'master' into WebServerSimplificationsAndHanders
SuGlider Dec 19, 2022
6548923
Merge branch 'master' into WebServerSimplificationsAndHanders
dirkx May 6, 2023
bb77987
Merge branch 'master' into pr/7429
lucasssvaz Jan 8, 2024
dcd64e1
Update for 3.0.0 and QoL improvements
lucasssvaz Jan 8, 2024
6813672
Remove examples that depend on external libraries
lucasssvaz Jan 8, 2024
c3ff7e0
Skip H2 testing
lucasssvaz Jan 9, 2024
d24668e
Formatting improvements
lucasssvaz Jan 9, 2024
ffdd841
Move builders examples to Utilities folder
lucasssvaz Jan 11, 2024
dc1a920
Fix indentation
lucasssvaz Jan 11, 2024
289f59d
Add HashBuilder abstract class
lucasssvaz Jan 11, 2024
81663f5
Add SHA1Builder
lucasssvaz Jan 11, 2024
85b2f68
Fix comment
lucasssvaz Jan 11, 2024
9ff23e7
Fix whitespace
lucasssvaz Jan 12, 2024
5631cf4
Fix crashes and improve log messages
lucasssvaz Jan 16, 2024
48f97ea
Merge remote-tracking branch 'origin/master' into pr/7429
lucasssvaz Jan 16, 2024
05fd5c5
Fix indentation for webserver
lucasssvaz Jan 16, 2024
d0ecd1f
Merge branch 'master' into WebServerSimplificationsAndHanders
lucasssvaz Jan 16, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix whitespace
  • Loading branch information
lucasssvaz committed Jan 12, 2024
commit 9ff23e70b4f268b9a1e44d413275ed01055af8d9
160 changes: 80 additions & 80 deletions cores/esp32/SHA1Builder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,107 +101,107 @@ void SHA1Builder::process(const uint8_t* data)
#define sha1_F(x,y,z) (z ^ (x & (y ^ z)))
#define sha1_K 0x5A827999

sha1_P( A, B, C, D, E, W[0] );
sha1_P( E, A, B, C, D, W[1] );
sha1_P( D, E, A, B, C, W[2] );
sha1_P( C, D, E, A, B, W[3] );
sha1_P( B, C, D, E, A, W[4] );
sha1_P( A, B, C, D, E, W[5] );
sha1_P( E, A, B, C, D, W[6] );
sha1_P( D, E, A, B, C, W[7] );
sha1_P( C, D, E, A, B, W[8] );
sha1_P( B, C, D, E, A, W[9] );
sha1_P( A, B, C, D, E, W[10] );
sha1_P( E, A, B, C, D, W[11] );
sha1_P( D, E, A, B, C, W[12] );
sha1_P( C, D, E, A, B, W[13] );
sha1_P( B, C, D, E, A, W[14] );
sha1_P( A, B, C, D, E, W[15] );
sha1_P( E, A, B, C, D, sha1_R(16) );
sha1_P( D, E, A, B, C, sha1_R(17) );
sha1_P( C, D, E, A, B, sha1_R(18) );
sha1_P( B, C, D, E, A, sha1_R(19) );
sha1_P(A, B, C, D, E, W[0]);
sha1_P(E, A, B, C, D, W[1]);
sha1_P(D, E, A, B, C, W[2]);
sha1_P(C, D, E, A, B, W[3]);
sha1_P(B, C, D, E, A, W[4]);
sha1_P(A, B, C, D, E, W[5]);
sha1_P(E, A, B, C, D, W[6]);
sha1_P(D, E, A, B, C, W[7]);
sha1_P(C, D, E, A, B, W[8]);
sha1_P(B, C, D, E, A, W[9]);
sha1_P(A, B, C, D, E, W[10]);
sha1_P(E, A, B, C, D, W[11]);
sha1_P(D, E, A, B, C, W[12]);
sha1_P(C, D, E, A, B, W[13]);
sha1_P(B, C, D, E, A, W[14]);
sha1_P(A, B, C, D, E, W[15]);
sha1_P(E, A, B, C, D, sha1_R(16));
sha1_P(D, E, A, B, C, sha1_R(17));
sha1_P(C, D, E, A, B, sha1_R(18));
sha1_P(B, C, D, E, A, sha1_R(19));

#undef sha1_K
#undef sha1_F

#define sha1_F(x,y,z) (x ^ y ^ z)
#define sha1_K 0x6ED9EBA1

sha1_P( A, B, C, D, E, sha1_R(20) );
sha1_P( E, A, B, C, D, sha1_R(21) );
sha1_P( D, E, A, B, C, sha1_R(22) );
sha1_P( C, D, E, A, B, sha1_R(23) );
sha1_P( B, C, D, E, A, sha1_R(24) );
sha1_P( A, B, C, D, E, sha1_R(25) );
sha1_P( E, A, B, C, D, sha1_R(26) );
sha1_P( D, E, A, B, C, sha1_R(27) );
sha1_P( C, D, E, A, B, sha1_R(28) );
sha1_P( B, C, D, E, A, sha1_R(29) );
sha1_P( A, B, C, D, E, sha1_R(30) );
sha1_P( E, A, B, C, D, sha1_R(31) );
sha1_P( D, E, A, B, C, sha1_R(32) );
sha1_P( C, D, E, A, B, sha1_R(33) );
sha1_P( B, C, D, E, A, sha1_R(34) );
sha1_P( A, B, C, D, E, sha1_R(35) );
sha1_P( E, A, B, C, D, sha1_R(36) );
sha1_P( D, E, A, B, C, sha1_R(37) );
sha1_P( C, D, E, A, B, sha1_R(38) );
sha1_P( B, C, D, E, A, sha1_R(39) );
sha1_P(A, B, C, D, E, sha1_R(20));
sha1_P(E, A, B, C, D, sha1_R(21));
sha1_P(D, E, A, B, C, sha1_R(22));
sha1_P(C, D, E, A, B, sha1_R(23));
sha1_P(B, C, D, E, A, sha1_R(24));
sha1_P(A, B, C, D, E, sha1_R(25));
sha1_P(E, A, B, C, D, sha1_R(26));
sha1_P(D, E, A, B, C, sha1_R(27));
sha1_P(C, D, E, A, B, sha1_R(28));
sha1_P(B, C, D, E, A, sha1_R(29));
sha1_P(A, B, C, D, E, sha1_R(30));
sha1_P(E, A, B, C, D, sha1_R(31));
sha1_P(D, E, A, B, C, sha1_R(32));
sha1_P(C, D, E, A, B, sha1_R(33));
sha1_P(B, C, D, E, A, sha1_R(34));
sha1_P(A, B, C, D, E, sha1_R(35));
sha1_P(E, A, B, C, D, sha1_R(36));
sha1_P(D, E, A, B, C, sha1_R(37));
sha1_P(C, D, E, A, B, sha1_R(38));
sha1_P(B, C, D, E, A, sha1_R(39));

#undef sha1_K
#undef sha1_F

#define sha1_F(x,y,z) ((x & y) | (z & (x | y)))
#define sha1_K 0x8F1BBCDC

sha1_P( A, B, C, D, E, sha1_R(40) );
sha1_P( E, A, B, C, D, sha1_R(41) );
sha1_P( D, E, A, B, C, sha1_R(42) );
sha1_P( C, D, E, A, B, sha1_R(43) );
sha1_P( B, C, D, E, A, sha1_R(44) );
sha1_P( A, B, C, D, E, sha1_R(45) );
sha1_P( E, A, B, C, D, sha1_R(46) );
sha1_P( D, E, A, B, C, sha1_R(47) );
sha1_P( C, D, E, A, B, sha1_R(48) );
sha1_P( B, C, D, E, A, sha1_R(49) );
sha1_P( A, B, C, D, E, sha1_R(50) );
sha1_P( E, A, B, C, D, sha1_R(51) );
sha1_P( D, E, A, B, C, sha1_R(52) );
sha1_P( C, D, E, A, B, sha1_R(53) );
sha1_P( B, C, D, E, A, sha1_R(54) );
sha1_P( A, B, C, D, E, sha1_R(55) );
sha1_P( E, A, B, C, D, sha1_R(56) );
sha1_P( D, E, A, B, C, sha1_R(57) );
sha1_P( C, D, E, A, B, sha1_R(58) );
sha1_P( B, C, D, E, A, sha1_R(59) );
sha1_P(A, B, C, D, E, sha1_R(40));
sha1_P(E, A, B, C, D, sha1_R(41));
sha1_P(D, E, A, B, C, sha1_R(42));
sha1_P(C, D, E, A, B, sha1_R(43));
sha1_P(B, C, D, E, A, sha1_R(44));
sha1_P(A, B, C, D, E, sha1_R(45));
sha1_P(E, A, B, C, D, sha1_R(46));
sha1_P(D, E, A, B, C, sha1_R(47));
sha1_P(C, D, E, A, B, sha1_R(48));
sha1_P(B, C, D, E, A, sha1_R(49));
sha1_P(A, B, C, D, E, sha1_R(50));
sha1_P(E, A, B, C, D, sha1_R(51));
sha1_P(D, E, A, B, C, sha1_R(52));
sha1_P(C, D, E, A, B, sha1_R(53));
sha1_P(B, C, D, E, A, sha1_R(54));
sha1_P(A, B, C, D, E, sha1_R(55));
sha1_P(E, A, B, C, D, sha1_R(56));
sha1_P(D, E, A, B, C, sha1_R(57));
sha1_P(C, D, E, A, B, sha1_R(58));
sha1_P(B, C, D, E, A, sha1_R(59));

#undef sha1_K
#undef sha1_F

#define sha1_F(x,y,z) (x ^ y ^ z)
#define sha1_K 0xCA62C1D6

sha1_P( A, B, C, D, E, sha1_R(60) );
sha1_P( E, A, B, C, D, sha1_R(61) );
sha1_P( D, E, A, B, C, sha1_R(62) );
sha1_P( C, D, E, A, B, sha1_R(63) );
sha1_P( B, C, D, E, A, sha1_R(64) );
sha1_P( A, B, C, D, E, sha1_R(65) );
sha1_P( E, A, B, C, D, sha1_R(66) );
sha1_P( D, E, A, B, C, sha1_R(67) );
sha1_P( C, D, E, A, B, sha1_R(68) );
sha1_P( B, C, D, E, A, sha1_R(69) );
sha1_P( A, B, C, D, E, sha1_R(70) );
sha1_P( E, A, B, C, D, sha1_R(71) );
sha1_P( D, E, A, B, C, sha1_R(72) );
sha1_P( C, D, E, A, B, sha1_R(73) );
sha1_P( B, C, D, E, A, sha1_R(74) );
sha1_P( A, B, C, D, E, sha1_R(75) );
sha1_P( E, A, B, C, D, sha1_R(76) );
sha1_P( D, E, A, B, C, sha1_R(77) );
sha1_P( C, D, E, A, B, sha1_R(78) );
sha1_P( B, C, D, E, A, sha1_R(79) );
sha1_P(A, B, C, D, E, sha1_R(60));
sha1_P(E, A, B, C, D, sha1_R(61));
sha1_P(D, E, A, B, C, sha1_R(62));
sha1_P(C, D, E, A, B, sha1_R(63));
sha1_P(B, C, D, E, A, sha1_R(64));
sha1_P(A, B, C, D, E, sha1_R(65));
sha1_P(E, A, B, C, D, sha1_R(66));
sha1_P(D, E, A, B, C, sha1_R(67));
sha1_P(C, D, E, A, B, sha1_R(68));
sha1_P(B, C, D, E, A, sha1_R(69));
sha1_P(A, B, C, D, E, sha1_R(70));
sha1_P(E, A, B, C, D, sha1_R(71));
sha1_P(D, E, A, B, C, sha1_R(72));
sha1_P(C, D, E, A, B, sha1_R(73));
sha1_P(B, C, D, E, A, sha1_R(74));
sha1_P(A, B, C, D, E, sha1_R(75));
sha1_P(E, A, B, C, D, sha1_R(76));
sha1_P(D, E, A, B, C, sha1_R(77));
sha1_P(C, D, E, A, B, sha1_R(78));
sha1_P(B, C, D, E, A, sha1_R(79));

#undef sha1_K
#undef sha1_F
Expand Down