For excessively paranoid client authentication.
Updated Apr 5 2019:
because this is a gist from 2011 that people stumble into and maybe you should AES instead of 3DES in the year of our lord 2019.
some other notes:
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <stdint.h> | |
| #ifdef _MSC_VER | |
| #include <intrin.h> /* for rdtscp and clflush */ | |
| #pragma optimize("gt",on) | |
| #else | |
| #include <x86intrin.h> /* for rdtscp and clflush */ | |
| #endif |
Ok, so, you might know about JavaScript regular expressions. Well, here is a tutorial about them, but written by a 13 year old, so it isn't actually any good!
Regular expressions go between / characters. Here is an exampe, /hi/.
Ok, now then. Let's learn how to match the string abc. Well, that's quite simple.
/abc/. Yey! So putting letters next to each other makes them match one after the other.
Ok, now, after the second / we can put a g to make it match globally, that is, we can extract abc from xyzabcghi.