Protocol++® (Protocolpp®)  v5.6.2
ProtocolPP::jxmssaddr Class Reference

Public Member Functions

 jxmssaddr ()
 Standard constructor with OTSADDR type and all addresses set to zero.
 
 jxmssaddr (ots_addrtype_t type)
 
 jxmssaddr (ots_addrtype_t type, uint32_t layeraddr, uint64_t treeaddr, uint32_t addrorpad, uint32_t chainorheight, uint32_t hashorindex, uint32_t hashnmask)
 
virtual ~jxmssaddr ()=default
 Standard deconstructor.
 
template<typename T >
void set_field (field_t field, T fieldval)
 
template<typename T >
get_field (field_t field)
 

Constructor & Destructor Documentation

◆ jxmssaddr() [1/2]

ProtocolPP::jxmssaddr::jxmssaddr ( ots_addrtype_t  type)
explicit

Standard constructor with type, all addresses set to zero

Parameters
type- WOTS+ address type (OTSADDR, LTREEADDR, HASHADDR)

◆ jxmssaddr() [2/2]

ProtocolPP::jxmssaddr::jxmssaddr ( ots_addrtype_t  type,
uint32_t  layeraddr,
uint64_t  treeaddr,
uint32_t  addrorpad,
uint32_t  chainorheight,
uint32_t  hashorindex,
uint32_t  hashnmask 
)

Constructor with type and all addresses

Parameters
type- WOTS+ address type (OTSHASH, LTREEADDR, HASHADDR)
layeraddr- Address of the tree layer
treeaddr- Address of the tree
addrorpad- OTS, LTREE address or PAD value
chainorheight- Chain address or tree height
hashorindex- Hash address or tree index
hashnmask- Hash and mask value

Member Function Documentation

◆ get_field()

template<typename T >
T ProtocolPP::jxmssaddr::get_field ( field_t  field)

Returns the XMSS address field

XMSSADDR Get Fields
field typefield nameExample
otsaddr_tTYPEotsaddr_t type = get_field<otsaddr_t>(field_t::TYPE)
uint32_tLAYERADDRuint32_t addr = get_field<uint32_t>(field_t::LAYERADDR)
uint64_tTREEADDRuint64_t addr = get_field<uint64_t>(field_t::TREEADDR)
uint32_tTYPEVALuint32_t addr = get_field<uint32_t>(field_t::TYPEVAL)
uint32_tADDRORPADuint32_t addr = get_field<uint32_t>(field_t::ADDRORPAD)
uint32_tCHAINORHEIGHTuint32_t addr = get_field<uint32_t>(field_t::CHAINORHEIGHT)
uint32_tHASHORINDEXuint32_t addr = get_field<uint32_t>(field_t::HASHORINDEX)
uint32_tHASHNMASKuint32_t addr = get_field<uint32_t>(field_t::HASHNMASK)
jarray<uint8_t>BYTEARRAYjarray<uint8_t> bytearray = get_field<jarray<uint8_t>>(field_t::BYTEARRAY)
Parameters
field- field to retrieve from the IP security association
Returns
field of the IP security association

◆ set_field()

template<typename T >
void ProtocolPP::jxmssaddr::set_field ( field_t  field,
fieldval 
)

Allows the user to update the XMSS address field

XMSSADDR Set Fields
field typefield nameExample
otsaddr_tTYPEset_field<otsaddr_t>(field_t::TYPE, otsaddr_t::OTSADDR)
uint32_tLAYERADDRset_field<uint32_t>(field_t::LAYERADDR, 0x12345678)
uint64_tTREEADDRset_field<uint64_t>(field_t::TREEADDR, 0x9876543212345678)
uint32_tTYPEVALset_field<uint32_t>(field_t::TYPEVAL, 0x12345678)
uint32_tADDRORPADset_field<uint32_t>(field_t::ADDRORPAD, 0x12345678)
uint32_tCHAINORHEIGHTset_field<uint32_t>(field_t::CHAINORHEIGHT, 0x12345678)
uint32_tHASHORINDEXset_field<uint32_t>(field_t::HASHORINDEX, 0x12345678)
uint32_tHASHNMASKset_field<uint32_t>(field_t::HASHNMASK, 0x12345678)
Parameters
field- field to update
fieldval- value to update

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