early-access version 2862
This commit is contained in:
16
externals/cpp-jwt/include/jwt/test/test_hmac.cc
vendored
Executable file
16
externals/cpp-jwt/include/jwt/test/test_hmac.cc
vendored
Executable file
@@ -0,0 +1,16 @@
|
||||
#include <iostream>
|
||||
#include "jwt/algorithm.hpp"
|
||||
|
||||
void basic_hmac_test()
|
||||
{
|
||||
jwt::string_view sv = "secret" ;
|
||||
jwt::string_view d = "Some random data string";
|
||||
auto res = jwt::HMACSign<jwt::algo::HS256>::sign(sv, d);
|
||||
|
||||
std::cout << res.first << std::endl;
|
||||
}
|
||||
|
||||
int main() {
|
||||
basic_hmac_test();
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user