include/jwt/test/test_hmac.cc
raw| 1 | #include <iostream> |
| 2 | #include "jwt/algorithm.hpp" |
| 3 | |
| 4 | void basic_hmac_test() |
| 5 | { |
| 6 | jwt::string_view sv = "secret" ; |
| 7 | jwt::string_view d = "Some random data string"; |
| 8 | auto res = jwt::HMACSign<jwt::algo::HS256>::sign(sv, d); |
| 9 | |
| 10 | std::cout << res.first << std::endl; |
| 11 | } |
| 12 | |
| 13 | int main() { |
| 14 | basic_hmac_test(); |
| 15 | return 0; |
| 16 | } |