mal-packet-weaver
C++20 packet serialization/deserialization library.
Loading...
Searching...
No Matches
mal_packet_weaver::crypto::KeyPair Struct Reference

Represents a pair of cryptographic keys (public and private keys). More...

#include "crypto-common.hpp"

Collaboration diagram for mal_packet_weaver::crypto::KeyPair:
[legend]

Public Member Functions

 KeyPair (const Key private_key, const Key public_key)
 Constructs a KeyPair object with the given private and public keys.
 
auto get_public_key_view () const
 Returns a view of the public key.
 
auto get_private_key_view () const
 Returns a view of the private key.
 

Public Attributes

Key private_key
 
Key public_key
 

Detailed Description

Represents a pair of cryptographic keys (public and private keys).

Definition at line 125 of file crypto-common.hpp.

Constructor & Destructor Documentation

◆ KeyPair()

mal_packet_weaver::crypto::KeyPair::KeyPair ( const Key private_key,
const Key public_key )
inline

Constructs a KeyPair object with the given private and public keys.

Parameters
private_keyThe private key.
public_keyThe public key.

Definition at line 132 of file crypto-common.hpp.

Member Function Documentation

◆ get_private_key_view()

auto mal_packet_weaver::crypto::KeyPair::get_private_key_view ( ) const
inlinenodiscard

Returns a view of the private key.

Returns
A view of the private key.

Definition at line 144 of file crypto-common.hpp.

◆ get_public_key_view()

auto mal_packet_weaver::crypto::KeyPair::get_public_key_view ( ) const
inlinenodiscard

Returns a view of the public key.

Returns
A view of the public key.

Definition at line 138 of file crypto-common.hpp.

Member Data Documentation

◆ private_key

Key mal_packet_weaver::crypto::KeyPair::private_key

The private key.

Definition at line 146 of file crypto-common.hpp.

◆ public_key

Key mal_packet_weaver::crypto::KeyPair::public_key

The public key.

Definition at line 147 of file crypto-common.hpp.


The documentation for this struct was generated from the following file: