MCPcopy Create free account
hub / github.com/arun11299/cpp-jwt / test_basic_header

Function test_basic_header

include/jwt/test/test_jwt_header.cc:4–14  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2#include "jwt/jwt.hpp"
3
4void test_basic_header()
5{
6 jwt::jwt_header hdr;
7 hdr = jwt::jwt_header{jwt::algorithm::HS256};
8 std::string jstr = to_json_str(hdr);
9 std::cout << jstr << std::endl;
10
11 std::string enc_str = hdr.base64_encode();
12 std::cout << "Base64: " << enc_str << std::endl;
13 std::cout << "Decoded: " << hdr.base64_decode(enc_str) << std::endl;
14}
15
16int main() {
17 test_basic_header();

Callers 1

mainFunction · 0.85

Calls 2

base64_encodeMethod · 0.80
base64_decodeMethod · 0.80

Tested by

no test coverage detected