Template Struct PEMSign
Defined in File algorithm.hpp
Struct Documentation
-
template<typename Hasher>
struct PEMSign OpenSSL PEM based signature and verfication.
The template type
Hasher
takes the type representing the PEM algorithm type from thejwt::algo
namespace.For NONE algorithm, HMACSign<> specialization is used. See that for more details.
Public Static Functions
-
static inline sign_result_t sign(const jwt::string_view key, const jwt::string_view data)
Signs the input data using PEM encryption algorithm.
Arguments: @key : The key/secret to be used for signing. Cannot be an empty string. @data: The data to be signed.
Exceptions: Any allocation failure would be thrown out as jwt::MemoryAllocationException.
-
static verify_result_t verify(const jwt::string_view key, const jwt::string_view head, const jwt::string_view sign)
-
static inline sign_result_t sign(const jwt::string_view key, const jwt::string_view data)