Abstraction of public key in crypto transformation. More...
#include <ndn-cxx/security/transform/public-key.hpp>
Classes | |
class | Error |
Public Member Functions | |
PublicKey () | |
Create an empty public key instance. More... | |
~PublicKey () | |
ConstBufferPtr | encrypt (const uint8_t *plainText, size_t plainLen) const |
ConstBufferPtr | encrypt (span< const uint8_t > plainText) const |
KeyType | getKeyType () const |
Get the type of the public key. More... | |
void | loadPkcs8 (const uint8_t *buf, size_t size) |
Load the public key in PKCS#8 format from a buffer buf . More... | |
void | loadPkcs8 (span< const uint8_t > buf) |
Load the public key in PKCS#8 format from a buffer buf . More... | |
void | loadPkcs8 (std::istream &is) |
Load the public key in PKCS#8 format from a stream is . More... | |
void | loadPkcs8Base64 (const uint8_t *buf, size_t size) |
Load the public key in base64-encoded PKCS#8 format from a buffer buf . More... | |
void | loadPkcs8Base64 (span< const uint8_t > buf) |
Load the public key in base64-encoded PKCS#8 format from a buffer buf . More... | |
void | loadPkcs8Base64 (std::istream &is) |
Load the public key in base64-encoded PKCS#8 format from a stream is . More... | |
void | savePkcs8 (std::ostream &os) const |
Save the public key in PKCS#8 format into a stream os . More... | |
void | savePkcs8Base64 (std::ostream &os) const |
Save the public key in base64-encoded PKCS#8 format into a stream os . More... | |
Friends | |
class | VerifierFilter |
Abstraction of public key in crypto transformation.
Definition at line 35 of file public-key.hpp.
ndn::security::transform::PublicKey::PublicKey | ( | ) |
Create an empty public key instance.
One must call loadXXXX(...) to load a public key.
Definition at line 64 of file public-key.cpp.
|
default |
|
inline |
plainText
encrypted using this public key. Only RSA encryption is supported for now.
Definition at line 134 of file public-key.hpp.
ConstBufferPtr ndn::security::transform::PublicKey::encrypt | ( | span< const uint8_t > | plainText | ) | const |
plainText
encrypted using this public key.Only RSA encryption is supported for now.
Definition at line 134 of file public-key.cpp.
KeyType ndn::security::transform::PublicKey::getKeyType | ( | ) | const |
Get the type of the public key.
Definition at line 72 of file public-key.cpp.
|
inline |
Load the public key in PKCS#8 format from a buffer buf
.
Definition at line 72 of file public-key.hpp.
void ndn::security::transform::PublicKey::loadPkcs8 | ( | span< const uint8_t > | buf | ) |
Load the public key in PKCS#8 format from a buffer buf
.
Definition at line 88 of file public-key.cpp.
void ndn::security::transform::PublicKey::loadPkcs8 | ( | std::istream & | is | ) |
Load the public key in PKCS#8 format from a stream is
.
Definition at line 98 of file public-key.cpp.
|
inline |
Load the public key in base64-encoded PKCS#8 format from a buffer buf
.
Definition at line 95 of file public-key.hpp.
void ndn::security::transform::PublicKey::loadPkcs8Base64 | ( | span< const uint8_t > | buf | ) |
Load the public key in base64-encoded PKCS#8 format from a buffer buf
.
Definition at line 106 of file public-key.cpp.
void ndn::security::transform::PublicKey::loadPkcs8Base64 | ( | std::istream & | is | ) |
Load the public key in base64-encoded PKCS#8 format from a stream is
.
Definition at line 114 of file public-key.cpp.
void ndn::security::transform::PublicKey::savePkcs8 | ( | std::ostream & | os | ) | const |
Save the public key in PKCS#8 format into a stream os
.
Definition at line 122 of file public-key.cpp.
void ndn::security::transform::PublicKey::savePkcs8Base64 | ( | std::ostream & | os | ) | const |
Save the public key in base64-encoded PKCS#8 format into a stream os
.
Definition at line 128 of file public-key.cpp.
|
friend |
Definition at line 140 of file public-key.hpp.