Base class for ECDSA family of algorithms.
More...
#include <goby/util/thirdparty/jwt-cpp/jwt.h>
|
| ecdsa (const std::string &public_key, const std::string &private_key, const std::string &public_key_password, const std::string &private_key_password, const EVP_MD *(*md)(), std::string name, size_t siglen) |
|
std::string | sign (const std::string &data, std::error_code &ec) const |
|
void | verify (const std::string &data, const std::string &signature, std::error_code &ec) const |
|
std::string | name () const |
|
Base class for ECDSA family of algorithms.
Definition at line 1152 of file jwt.h.
◆ ecdsa()
jwt::algorithm::ecdsa::ecdsa |
( |
const std::string & |
public_key, |
|
|
const std::string & |
private_key, |
|
|
const std::string & |
public_key_password, |
|
|
const std::string & |
private_key_password, |
|
|
const EVP_MD *(*)() |
md, |
|
|
std::string |
name, |
|
|
size_t |
siglen |
|
) |
| |
|
inline |
Construct new ecdsa algorithm
- Parameters
-
public_key | ECDSA public key in PEM format |
private_key | ECDSA private key or empty string if not available. If empty, signing will always fail |
public_key_password | Password to decrypt public key pem |
private_key_password | Password to decrypt private key pem |
md | Pointer to hash function |
name | Name of the algorithm |
siglen | The bit length of the signature |
Definition at line 1165 of file jwt.h.
◆ name()
std::string jwt::algorithm::ecdsa::name |
( |
| ) |
const |
|
inline |
Returns the algorithm name provided to the constructor
- Returns
- algorithm's name
Definition at line 1303 of file jwt.h.
◆ sign()
std::string jwt::algorithm::ecdsa::sign |
( |
const std::string & |
data, |
|
|
std::error_code & |
ec |
|
) |
| const |
|
inline |
Sign jwt data
- Parameters
-
data | The data to sign |
ec | error_code filled with details on error |
- Returns
- ECDSA signature for the given data
Definition at line 1198 of file jwt.h.
◆ verify()
void jwt::algorithm::ecdsa::verify |
( |
const std::string & |
data, |
|
|
const std::string & |
signature, |
|
|
std::error_code & |
ec |
|
) |
| const |
|
inline |
Check if signature is valid
- Parameters
-
data | The data to check signature against |
signature | Signature provided by the jwt |
ec | Filled with details on error |
Definition at line 1247 of file jwt.h.
The documentation for this struct was generated from the following file:
- goby/util/thirdparty/jwt-cpp/jwt.h