CXI
Loading...
Searching...
No Matches
Public Member Functions | List of all members
MechParamOAEP Class Reference

Constructs a mechanism parameter that can be used on RSA encryption operations with the PKCS#1, v2.1 RSAES-OAEP encryption / decryption padding scheme. More...

Inheritance diagram for MechParamOAEP:
[legend]
Collaboration diagram for MechParamOAEP:
[legend]

Public Member Functions

 MechParamOAEP (int mech, int mgf_algo, const std::string &label)
 
MechanismParameter getEncoded (void)
 
- Public Member Functions inherited from MechParam
 MechParam (int mech)
 Constructs a mechanism parameter with the given mechanism specifier. More...
 
MechanismParameter getEncoded (void)
 

Detailed Description

Constructs a mechanism parameter that can be used on RSA encryption operations with the PKCS#1, v2.1 RSAES-OAEP encryption / decryption padding scheme.

The following example illustrates the usage of the MechParamOAEP class:

// encrypt data with OAEP padding scheme
ByteArray crypt = cxi->crypt(0, rsaKey, mechParam.getEncoded(), data);
Encapsulates an array of primitive type char in an object and provides methods to operate on binary d...
Definition: sw/cxi_api_c/def/bytearray.h:22
Constructs a mechanism parameter that can be used on RSA encryption operations with the PKCS#1,...
Definition: sw/cxi_api_c/def/mechparam.h:86
MechanismParameter getEncoded(void)
Definition: mechparam.cpp:606
#define CXI_MECH_HASH_ALGO_SHA256
SHA256.
Definition: fw/cxi/def/cxi_defs.h:454
#define CXI_MECH_MODE_ENCRYPT
Encryption mode.
Definition: fw/cxi/def/cxi_defs.h:332
#define CXI_MECH_PAD_OAEP
Apply padding according to PKCS#1_v2.1 RSAES-OAEP.
Definition: fw/cxi/def/cxi_defs.h:400
Definition: cxi.cpp:173

Constructor & Destructor Documentation

◆ MechParamOAEP()

MechParamOAEP ( int  mech,
int  mgf_algo,
const std::string &  label 
)

Constructs a mechanism specifier and parameter for PKCS#1, v2.1 RSAES-OAEP encryption / decryption padding scheme.

Parameters
mechmechanism specifier, XOR combination of:
mgf_algoalgorithm specifier for the MGF algorithm to be used, see Hash Algorithms
labellabel string to be used

Member Function Documentation

◆ getEncoded()

MechanismParameter getEncoded ( void  )
Returns
Returns the encoded mechanism parameter.