|
SOIL C++
C++ Unified Device Interface
|
#include <Signer.h>
Public Member Functions | |
| Signer (std::string filename) | |
| Constructor. More... | |
| ~Signer () | |
| Destructor. More... | |
| std::vector< unsigned char > | sign (std::vector< unsigned char > digest) |
| Sign bytes. More... | |
| std::string | openssl_version (void) const |
| OpenSSL Version. More... | |
| std::string | name () const |
| Filename. More... | |
Class to provide a convenient interface to sign bytestrings using a private key. Internally based on OpenSSL.
| SIGN::Signer::Signer | ( | std::string | filename | ) |
Default constructor loading the private key in PEM-format and initializing necessary methods.
| [in] | filename | Path to the private key in PEM-format. |
Definition at line 11 of file Signer.cpp.
| SIGN::Signer::~Signer | ( | ) |
Destructor, internally calls EVP_PKEY_free.
Definition at line 36 of file Signer.cpp.
|
inline |
| std::string SIGN::Signer::openssl_version | ( | void | ) | const |
Retreive the OpenSSL Version string. This is helpful to check whether the correct OpenSSL library has been loaded as by experience on windows there are many OpenSSL versions. Using a too old version of OpenSSL leads to very bad performance.
Definition at line 61 of file Signer.cpp.
| std::vector< unsigned char > SIGN::Signer::sign | ( | std::vector< unsigned char > | digest | ) |
Sign the bytestring provided to this function and returns the signature bytestring.
| [in] | digest | Bytes to sign, typically a digest from a previous hashing function |
Definition at line 41 of file Signer.cpp.