Template Struct HMACSign< algo::NONE >

Struct Documentation

template<>
struct HMACSign<algo::NONE>

Specialization of HMACSign class for NONE algorithm.

This specialization is selected for even PEM based algorithms.

The signing and verification APIs are basically no-op except that they would set the relevant error code.

NOTE: error_code would be set in the case of usage of NONE algorithm. Users of this API are expected to check for the case explicitly.

Public Types

using hasher_type = algo::NONE

Public Static Functions

static inline sign_result_t sign(const jwt::string_view key, const jwt::string_view data)

Basically a no-op. Sets the error code to NoneAlgorithmUsed.

static inline verify_result_t verify(const jwt::string_view key, const jwt::string_view head, const jwt::string_view sign)

Basically a no-op. Sets the error code to NoneAlgorithmUsed.