MCPcopy Create free account
hub / github.com/Thalhammer/jwt-cpp / eddsa

Method eddsa

include/jwt-cpp/jwt.h:1821–1830  ·  view source on GitHub ↗

* Construct new eddsa algorithm * \param public_key EdDSA public key in PEM format * \param private_key EdDSA private key or empty string if not available. If empty, signing will always * fail. * \param public_key_password Password to decrypt public key pem. * \param private_key_password Password * to decrypt private key pem. * \param name Name of the algorithm */

Source from the content-addressed store, hash-verified

1819 * \param name Name of the algorithm
1820 */
1821 eddsa(const std::string& public_key, const std::string& private_key, const std::string& public_key_password,
1822 const std::string& private_key_password, std::string name)
1823 : alg_name(std::move(name)) {
1824 if (!private_key.empty()) {
1825 pkey = helper::load_private_key_from_string(private_key, private_key_password);
1826 } else if (!public_key.empty()) {
1827 pkey = helper::load_public_key_from_string(public_key, public_key_password);
1828 } else
1829 throw error::ecdsa_exception(error::ecdsa_error::load_key_bio_read);
1830 }
1831 /**
1832 * Sign jwt data
1833 * \param data The data to sign

Callers

nothing calls this directly

Calls 4

ecdsa_exceptionClass · 0.85
emptyMethod · 0.80

Tested by

no test coverage detected