signature stream buffer.
More...
#include <signature.hpp>
|
| virtual int_type | overflow (int_type c=traits_type::eof()) override |
| | writes characters to the associated output sequence from the put area.
|
| |
| std::unique_ptr< char[]> | _buf |
| | internal buffer.
|
| |
| const EVP_MD * | _md |
| | message digest.
|
| |
| EvpMdCtxPtr | _ctx |
| | message digest context.
|
| |
| static const std::streamsize | _bufsize = 256 |
| | internal buffer size.
|
| |
◆ Signaturebuf() [1/3]
| Signaturebuf::Signaturebuf |
( |
const std::string & | algo | ) |
|
create the signature stream buffer instance.
- Parameters
-
| algo | the message digest used. |
◆ Signaturebuf() [2/3]
| join::Signaturebuf::Signaturebuf |
( |
const Signaturebuf & | other | ) |
|
|
delete |
copy constructor.
- Parameters
-
| other | other object to copy. |
◆ Signaturebuf() [3/3]
move constructor.
- Parameters
-
| other | other object to move. |
◆ ~Signaturebuf()
| virtual join::Signaturebuf::~Signaturebuf |
( |
| ) |
|
|
virtualdefault |
destroy the signature stream buffer instance.
◆ operator=() [1/2]
copy assignment operator.
- Parameters
-
| other | other object to assign. |
- Returns
- current object.
◆ operator=() [2/2]
move assignment operator.
- Parameters
-
| other | other object to assign. |
- Returns
- current object.
◆ sign()
| BytesArray Signaturebuf::sign |
( |
const std::string & | privKey | ) |
|
sign with the given private key.
- Parameters
-
| privKey | path to private key. |
- Returns
- the generated signature on success, an empty bytes array on failure.
◆ verify()
| bool Signaturebuf::verify |
( |
const BytesArray & | sig, |
|
|
const std::string & | pubKey ) |
verify signature with the given public key.
- Parameters
-
| sig | the message signature. |
| pubKey | path to public key. |
- Returns
- true on success, false otherwise.
The documentation for this class was generated from the following files: