EC private key.
More...
#include <ec.hpp>
Inherits ndnph::detail::NamedPrivateKey< SigType::Sha256WithEcdsa >.
|
| operator bool () const |
| Determine if this key is non-empty.
|
|
bool | import (const Name &name, const uint8_t raw[KeyLen::value]) |
| Import a private key from raw key bits.
|
|
size_t | getMaxSigLen () const final |
|
ssize_t | sign (std::initializer_list< tlv::Value > chunks, uint8_t *sig) const final |
| Perform signing.
|
|
void | updateSigInfo (SigInfo &sigInfo) const override |
| Write SigType and KeyLocator.
|
|
virtual | ~PrivateKey ()=default |
|
const Name & | getName () const |
| Retrieve KeyLocator name.
|
|
void | setName (const Name &v) |
| Assign KeyLocator name.
|
|
◆ KeyLen
◆ MaxSigLen
◆ getMaxSigLen()
size_t ndnph::ec::EcPrivateKey::getMaxSigLen |
( |
| ) |
const |
|
inlinefinalvirtual |
◆ import()
bool ndnph::ec::EcPrivateKey::import |
( |
const Name & |
name, |
|
|
const uint8_t |
raw[KeyLen::value] |
|
) |
| |
|
inline |
Import a private key from raw key bits.
- Returns
- whether success.
◆ operator bool()
ndnph::ec::EcPrivateKey::operator bool |
( |
| ) |
const |
|
inlineexplicit |
Determine if this key is non-empty.
◆ sign()
ssize_t ndnph::ec::EcPrivateKey::sign |
( |
std::initializer_list< tlv::Value > |
chunks, |
|
|
uint8_t * |
sig |
|
) |
| const |
|
inlinefinalvirtual |
Perform signing.
- Parameters
-
| chunks | signed portion. |
[out] | sig | signature buffer, with getMaxSigLen() room. |
- Returns
- signature length, or -1 upon failure.
Implements ndnph::PrivateKey.
The documentation for this class was generated from the following file:
- /home/runner/work/esp8266ndn/NDNph/src/ndnph/keychain/ec.hpp