Protocol++® (Protocolpp®)  v5.6.2
ProtocolPP::jmemblobsa Class Reference
Inheritance diagram for ProtocolPP::jmemblobsa:
Collaboration diagram for ProtocolPP::jmemblobsa:

Public Member Functions

 jmemblobsa ()
 
 jmemblobsa (direction_t direction, uint8_t *bkek, uint32_t bkek_size, uint8_t *blobkey, uint32_t blobkey_size)
 
 jmemblobsa (jmemblobsa &rhs)
 
 jmemblobsa (std::shared_ptr< jmemblobsa > &rhs)
 
 ~jmemblobsa ()
 Standard deconstructor.
 
template<typename T >
void set_field (field_t field, T fieldval)
 
template<typename T >
get_field (field_t field)
 
void to_xml (tinyxml2::XMLPrinter &myxml, direction_t direction)
 
void to_json (std::ofstream &myjson, direction_t direction, std::string &indent)
 
 jmemblobsa (const jmemblobsa &rhs)=delete
 
- Public Member Functions inherited from ProtocolPP::jsecass
 jsecass ()
 
virtual ~jsecass ()=default
 Standard deconstructor.
 
 jsecass (jsecass &jsecass)=delete
 
 jsecass (const jsecass &jsecass)=delete
 

Constructor & Destructor Documentation

◆ jmemblobsa() [1/4]

ProtocolPP::jmemblobsa::jmemblobsa ( )

Constructor for memory BLOB security association with defaults of 32 bytes for BKEKLEN and zero array of length 32 bytes

◆ jmemblobsa() [2/4]

ProtocolPP::jmemblobsa::jmemblobsa ( direction_t  direction,
uint8_t *  bkek,
uint32_t  bkek_size,
uint8_t *  blobkey,
uint32_t  blobkey_size 
)

Constructor for memory BLOB security association

Parameters
direction- direction of processing (ENCAP, DECAP)
bkek- system level key used for offline key protection
bkek_size- size of the bkek
blobkey- key used for encrypting BLOB material
blobkey_size- size of the blob_key

◆ jmemblobsa() [3/4]

ProtocolPP::jmemblobsa::jmemblobsa ( jmemblobsa rhs)

Copy Constructor for memory BLOB object

Parameters
rhs- memory BLOB object

◆ jmemblobsa() [4/4]

ProtocolPP::jmemblobsa::jmemblobsa ( std::shared_ptr< jmemblobsa > &  rhs)
explicit

Copy Constructor for memory BLOB object pointer

Parameters
rhs- memory BLOB object pointer

Member Function Documentation

◆ get_field()

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

Get a field in jmemblobsa

BlobSA Get Fields
field typefield nameExample
direction_tDIRECTIONdirection_t tmp = get_field<direction_t>(field_t::DIRECTION)
uint32_tBKEKLENuint32_t tmp = get_field<uint32_t>(field_t::BKEKLEN)
uint32_tBLOBKEYLENuint32_t tmp = get_field<uint32_t>(field_t::BLOBKEYLEN)
jarray<uint8_t>BKEKjarray<uint8_t> tmp = get_field<jarray<uint8_t>>(field_t::BKEK)
jarray<uint8_t>BLOBKEYjarray<uint8_t> tmp = get_field<jarray<uint8_t>>(field_t::BLOBKEY)
std::shared_ptr<jarray<uint8_t>>BKEKstd::shared_ptr<jarray<uint8_t>> tmp = get_field<std::shared_ptr<jarray<uint8_t>>>(field_t::BKEK)
std::shared_ptr<jarray<uint8_t>>BLOBKEYstd::shared_ptr<jarray<uint8_t>> tmp = get_field<std::shared_ptr<jarray<uint8_t>>>(field_t::BLOBKEY)
Parameters
field- field to retrieve with correct type

◆ set_field()

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

Set a field in jmemblobsa

BlobSA Set Fields
field typefield nameExample
direction_tDIRECTIONset_field<direction_t>(field_t::DIRECTION, direction_t::ENC)
uint32_tBKEKLENset_field<uint32_t>(field_t::BKEKLEN, 16)
uint32_tBLOBKEYLENset_field<uint32_t>(field_t::BLOBKEYLEN, 16)
jarray<uint8_t>BKEKset_field<jarray<uint8_t>>(field_t::BKEK, mykey)
jarray<uint8_t>BLOBKEYset_field<jarray<uint8_t>>(field_t::BLOBKEY, myiv)
std::shared_ptr<jarray<uint8_t>>BKEKset_field<std::shared_ptr<jarray<uint8_t>>>(field_t::BKEK, mykeyptr)
std::shared_ptr<jarray<uint8_t>>BLOBKEYset_field<std::shared_ptr<jarray<uint8_t>>>(field_t::BLOBKEY, myivptr)
Parameters
field- field to set
fieldval- value to set the field to based on type

◆ to_json()

void ProtocolPP::jmemblobsa::to_json ( std::ofstream &  myjson,
direction_t  direction,
std::string &  indent 
)
virtual

Return the protocol and security fields as JSON

Parameters
myjson- JSON object
direction- randomization
indent- indentation for JSON output

Implements ProtocolPP::jsecass.

◆ to_xml()

void ProtocolPP::jmemblobsa::to_xml ( tinyxml2::XMLPrinter myxml,
direction_t  direction 
)
virtual

Return the protocol and security fields as XML

Parameters
myxml- XMLPrinter object
direction- randomization

Implements ProtocolPP::jsecass.


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