|
libsshpp v0.1.7
Modern C++17 wrapper for libssh
|
#include <key.hpp>
Public Member Functions | |
| Key ()=default | |
| ~Key () | |
| Key (Key &&) noexcept | |
| Key & | operator= (Key &&) noexcept |
| Key (const Key &)=delete | |
| Key & | operator= (const Key &)=delete |
| operator bool () const noexcept | |
| native_key | native_handle () const noexcept |
| Result< std::string > | to_public_base64 () const |
| Result< std::string > | to_authorized_keys_line (std::string_view comment={}) const |
| Result< void > | write_public_file (const std::filesystem::path &) const |
| Result< Key > | public_part () const |
| KeyType | type () const noexcept |
| std::string | type_name () const |
| int | bits () const noexcept |
| bool | is_private () const noexcept |
| bool | is_public () const noexcept |
| Result< Fingerprint > | fingerprint (HashType=HashType::sha256) const |
| bool | equals (const Key &other, bool compare_private=false) const noexcept |
Static Public Member Functions | |
| static Key | from_native (native_key, Ownership) |
| static Result< Key > | from_private_file (const std::filesystem::path &, PassphraseCallback={}) |
| static Result< Key > | from_public_file (const std::filesystem::path &) |
| static Result< Key > | from_public_base64 (std::string_view b64, KeyType type) |
| static Result< Key > | from_authorized_keys_line (std::string_view line) |
| static Result< Key > | generate (KeyType, int bits=0) |
A public or private SSH key. See docs/design/04 ยง4.5. PublicKey in host-key APIs is an alias for this type with the invariant is_public().
|
default |
| SSHPP_INLINE sshpp::Key::~Key | ( | ) |
|
noexcept |
|
delete |
|
inlineexplicitnoexcept |
|
inlinenoexcept |
|
static |
|
static |
|
static |
|
static |
| SSHPP_INLINE Result< std::string > sshpp::Key::to_public_base64 | ( | ) | const |
| SSHPP_INLINE Result< std::string > sshpp::Key::to_authorized_keys_line | ( | std::string_view | comment = {} | ) | const |
| SSHPP_INLINE Result< void > sshpp::Key::write_public_file | ( | const std::filesystem::path & | path | ) | const |
|
noexcept |
| SSHPP_INLINE std::string sshpp::Key::type_name | ( | ) | const |
|
noexcept |
|
noexcept |
|
noexcept |
| SSHPP_INLINE Result< Fingerprint > sshpp::Key::fingerprint | ( | HashType | type = HashType::sha256 | ) | const |
|
noexcept |