lime
Lime is a C++ library implementing Open Whisper System Signal protocol
Loading...
Searching...
No Matches
lime::double_ratchet_protocol::DRHeader< Curve > Class Template Reference

helper class and functions to parse Double Ratchet message header and access its components More...

#include <lime_double_ratchet_protocol.hpp>

Public Member Functions

uint16_t Ns (void) const
 read-only accessor to Sender Chain index (Ns)
uint16_t PN (void) const
 read-only accessor to Previous Sender Chain index (PN)
const X< Curve, lime::Xtype::publicKey > & DHs (void) const
 read-only accessor to peer Double Ratchet public key
bool valid (void) const
 is this header valid? (property is set by constructor/parser)
bool payloadDirectEncryption (void) const
 what encryption mode is advertised in this header
size_t size (void)
 read-only accessor to the size of parsed header
 DRHeader ()=delete
 DRHeader (const std::vector< uint8_t > header)
 parse a buffer to find a header at the begining of it
 ~DRHeader ()

Detailed Description

template<typename Curve>
class lime::double_ratchet_protocol::DRHeader< Curve >

helper class and functions to parse Double Ratchet message header and access its components

Constructor & Destructor Documentation

◆ DRHeader() [1/2]

template<typename Curve>
lime::double_ratchet_protocol::DRHeader< Curve >::DRHeader ( )
delete

◆ DRHeader() [2/2]

template<typename Curve>
lime::double_ratchet_protocol::DRHeader< Curve >::DRHeader ( const std::vector< uint8_t > header)

parse a buffer to find a header at the begining of it

it perform some check on DR version byte and key id byte The valid flag is set if a valid header is found in input buffer

◆ ~DRHeader()

template<typename Curve>
lime::double_ratchet_protocol::DRHeader< Curve >::~DRHeader ( )
inline

Member Function Documentation

◆ DHs()

template<typename Curve>
const X< Curve, lime::Xtype::publicKey > & lime::double_ratchet_protocol::DRHeader< Curve >::DHs ( void ) const
inline

read-only accessor to peer Double Ratchet public key

◆ Ns()

template<typename Curve>
uint16_t lime::double_ratchet_protocol::DRHeader< Curve >::Ns ( void ) const
inline

read-only accessor to Sender Chain index (Ns)

◆ payloadDirectEncryption()

template<typename Curve>
bool lime::double_ratchet_protocol::DRHeader< Curve >::payloadDirectEncryption ( void ) const
inline

what encryption mode is advertised in this header

◆ PN()

template<typename Curve>
uint16_t lime::double_ratchet_protocol::DRHeader< Curve >::PN ( void ) const
inline

read-only accessor to Previous Sender Chain index (PN)

◆ size()

template<typename Curve>
size_t lime::double_ratchet_protocol::DRHeader< Curve >::size ( void )
inline

read-only accessor to the size of parsed header

◆ valid()

template<typename Curve>
bool lime::double_ratchet_protocol::DRHeader< Curve >::valid ( void ) const
inline

is this header valid? (property is set by constructor/parser)


The documentation for this class was generated from the following files: