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

Public Member Functions

 jintegritysa ()
 
 jintegritysa (auth_t auth, std::shared_ptr< jarray< uint8_t >> &authkey, std::shared_ptr< jarray< uint8_t >> &iv, direction_t dir=direction_t::DEC, uint32_t icvlen=16, uint32_t count=0, uint32_t fresh=0)
 
 jintegritysa (auth_t auth)
 
 jintegritysa (auth_t auth, uint32_t poly, uint32_t polylen=0, bool zeroinit=false, bool swapin=true, bool swapout=true, bool compout=true)
 
 jintegritysa (jintegritysa &rhs)
 standard copy constructor
 
 jintegritysa (std::shared_ptr< jintegritysa > &rhs)
 standard copy constructor from shared pointer
 
 ~jintegritysa ()
 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)
 
 jintegritysa (const jintegritysa &rsh)=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

◆ jintegritysa() [1/4]

ProtocolPP::jintegritysa::jintegritysa ( )

Constructor for default values as follows

Integrity Defaults
fieldDefault Value
dirdirection_t::DEC
authauth_t::CMAC
authkeyjarray<uint8_t>(0)
count0
fresh0
zeroinitfalse
swapinfalse
swapoutfalse
compoutfalse
integ.set_field<auth_t>(field_t::AUTH, auth_t::SHA1);
integ.set_field<uint32_t>(field_t::FRESH, 0xAA11BB22);
integ.set_field<bool>(field_t::SWAPIN, true);
auth_t
Definition: jenum.h:1906

◆ jintegritysa() [2/4]

ProtocolPP::jintegritysa::jintegritysa ( auth_t  auth,
std::shared_ptr< jarray< uint8_t >> &  authkey,
std::shared_ptr< jarray< uint8_t >> &  iv,
direction_t  dir = direction_t::DEC,
uint32_t  icvlen = 16,
uint32_t  count = 0,
uint32_t  fresh = 0 
)

Standard constructor (NOTE: SNOWA and ZUCA are the 3GPP implementations, not just the authentication algorithms)

Parameters
auth- Authentication algorithm (MD5, SHA1, SHA224, SHA256, SHA384, SHA512, SHA3_224, SHA3_256, SHA3_384, SHA3_512, SHAKE128, SHAKE256, AES_CMAC, AES_XCBC_MAC, AES_GMAC, ZUCA, SNOWA, SM3, POLY1305)
authkey- Key for authentication (not used for SHAKE)
iv- Initialization vector (IV) for AES_GMAC only
dir- direction of processing (UPLINK or DOWNLINK for ZUCA or SNOW3G-F9)
icvlen- Length of the ICV
count- Count value for ZUCA or SNOWA
fresh- Fresh value for ZUCA or SNOWA (for ZUCA this is the 5-bit BEARER, right justified)

◆ jintegritysa() [3/4]

ProtocolPP::jintegritysa::jintegritysa ( auth_t  auth)
explicit

Pre-defined CRC constructor

Parameters
auth- CRC algorithm (CRC32-IEEE, CRC32-IETF, CRC24, CRC16-CCITT, CRC16, CRC12, CRC11, CRC8, CRC7, CRC5)

◆ jintegritysa() [4/4]

ProtocolPP::jintegritysa::jintegritysa ( auth_t  auth,
uint32_t  poly,
uint32_t  polylen = 0,
bool  zeroinit = false,
bool  swapin = true,
bool  swapout = true,
bool  compout = true 
)

Custom CRC constructor

Parameters
auth- CRC algorithm (CRC32-IEEE, CRC32-IETF, CRC24, CRC16-CCITT, CRC16, CRC12, CRC11, CRC8, CRC7, CRC5, CRC_POLY)
poly- polynomial for CRC_POLY (only used for CRC_POLY, predefined types are already known)
polylen- polynomial size in bits (zero for predefined types)
zeroinit- Use all zero inital value (only used for CRC_POLY, predefined types are already known)
swapin- Swap input data during processing (only used for CRC_POLY, predefined types are already known)
swapout- Swap output data during processing (only used for CRC_POLY, predefined types are already known)
compout- Complement output data during processing (only used for CRC_POLY, predefined types are already known)

Member Function Documentation

◆ get_field()

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

get_field

Parameters
field- field to retrieve
Returns
Value of the field requested

◆ set_field()

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

set_field

Parameters
field- field to set
fieldval- New value to set in field

◆ to_json()

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

to_json Convert the security association to JSON for printing

Parameters
myjson- JSON printing object
direction- direction of processing
indent- indentation for JSON output

Implements ProtocolPP::jsecass.

◆ to_xml()

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

to_xml Convert the security association to XML for printing

Parameters
myxml- XML printing object
direction- direction of processing

Implements ProtocolPP::jsecass.


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