|
| static std::shared_ptr< jmodes > | get_cipher (jmodes::cipher_t cipher, jmodes::dir_t direction, jmodes::mode_t mode, uint8_t *key, uint32_t keylen, uint8_t *iv=nullptr, uint32_t ivlen=0, uint32_t icvlen=16, uint32_t count=0, uint8_t bearer=0) |
| |
| static std::shared_ptr< jmodes > | get_auth (auth_t auth, uint8_t *authkey=nullptr, uint32_t authkeylen=0, jmodes::dir_t dir=jmodes::ENC, uint32_t count=0, uint32_t fresh=0) |
| |
| static std::shared_ptr< jmodes > | get_auth (auth_t auth, jmodes::dir_t dir, uint8_t *authkey, uint32_t authkeylen, uint8_t *iv, uint32_t ivlen, uint32_t icvlen) |
| |
| static std::shared_ptr< jmodes > | get_crc (auth_t crc=auth_t::CRC32_IEEE, uint32_t poly=0, uint32_t polylen=0, bool zeroinit=false, bool swapin=true, bool swapout=true, bool xorout=true) |
| |
◆ get_auth() [1/2]
| static std::shared_ptr<jmodes> ProtocolPP::ciphers::get_auth |
( |
auth_t |
auth, |
|
|
jmodes::dir_t |
dir, |
|
|
uint8_t * |
authkey, |
|
|
uint32_t |
authkeylen, |
|
|
uint8_t * |
iv, |
|
|
uint32_t |
ivlen, |
|
|
uint32_t |
icvlen |
|
) |
| |
|
static |
Factory method to create an instance of authenticator for ZUC-256
- Parameters
-
| auth | - ZUCA-256 |
| dir | - direction of processing for SNOW3G and ZUC (UPLINK or DOWNLINK) |
| authkey | - Key for the authentication engine |
| authkeylen | - Length of the key for the authentication engine |
| iv | - IV for the authentication engine |
| ivlen | - Length of the IV for the authentication engine |
| icvlen | - Length of the ICV for the authentication engine (4, 8, 16) |
◆ get_auth() [2/2]
| static std::shared_ptr<jmodes> ProtocolPP::ciphers::get_auth |
( |
auth_t |
auth, |
|
|
uint8_t * |
authkey = nullptr, |
|
|
uint32_t |
authkeylen = 0, |
|
|
jmodes::dir_t |
dir = jmodes::ENC, |
|
|
uint32_t |
count = 0, |
|
|
uint32_t |
fresh = 0 |
|
) |
| |
|
static |
Factory method to create an instance of authenticator
- Parameters
-
| auth | - POLY1305, SNOWA, ZUCA, MD5, SHA1, SHA224, SHA3_224, SHA256, SHA3_256, SHA384, SHA3_384, SHA512, SHA3_512 |
| authkey | - Key for the authentication engine |
| authkeylen | - Length of the key for the authentication engine |
| dir | - direction of processing for SNOW3G and ZUC (UPLINK or DOWNLINK) |
| count | - Count value for SNOW3G and ZUC |
| fresh | - Fresh value for SNOW3G and ZUC |
◆ get_cipher()
| static std::shared_ptr<jmodes> ProtocolPP::ciphers::get_cipher |
( |
jmodes::cipher_t |
cipher, |
|
|
jmodes::dir_t |
direction, |
|
|
jmodes::mode_t |
mode, |
|
|
uint8_t * |
key, |
|
|
uint32_t |
keylen, |
|
|
uint8_t * |
iv = nullptr, |
|
|
uint32_t |
ivlen = 0, |
|
|
uint32_t |
icvlen = 16, |
|
|
uint32_t |
count = 0, |
|
|
uint8_t |
bearer = 0 |
|
) |
| |
|
static |
Factory method to create an instance of a cipher algorithm
- Parameters
-
| cipher | - DES, DES_EDE3, AES, ARIA, Camellia, SM4, SEED, CHACHA20, SNOWE, SNOWVE, ZUCE, ARC4 |
| direction | - Direction of processing (ENC or DEC) |
| mode | - ECB, CBC, CTR, GCM, CCM, CMAC, XTS XCBC_MAC, AUTH, AEAD, STREAM |
| key | - Encryption key |
| keylen | - Length of the encryption key |
| iv | - Initialization vector (IV) |
| ivlen | - Length of the IV |
| icvlen | - ICV length |
| count | - Count value for SNOW3G and ZUC |
| bearer | - Bearer value for SNOW3G and ZUC |
◆ get_crc()
| static std::shared_ptr<jmodes> ProtocolPP::ciphers::get_crc |
( |
auth_t |
crc = auth_t::CRC32_IEEE, |
|
|
uint32_t |
poly = 0, |
|
|
uint32_t |
polylen = 0, |
|
|
bool |
zeroinit = false, |
|
|
bool |
swapin = true, |
|
|
bool |
swapout = true, |
|
|
bool |
xorout = true |
|
) |
| |
|
static |
Factory method to create an instance of CRC
- Parameters
-
| crc | - Type of CRC to create CRC5, CRC7, CRC8, CRC11, CRC12, CRC16_CCITT, CRC24, CRC32_IETF, CRC32_IEEE, CRC_POLY |
| poly | - Polynomial for CRC if not predefined (CRC_POLY type only) |
| polylen | - length of polynomial in bits (CRC_POLY only) |
| zeroinit | - Initial value of the CRC is all zeros (rather than all 1s, CRC_POLY only) |
| swapin | - Input data is swapped before use (CRC_POLY only) |
| swapout | - Output data is swapped after final calculation (CRC_POLY only) |
| xorout | - XOR of output data (CRC_POLY only) |
The documentation for this class was generated from the following file: