lib/auth/request-dh-params.js
function encryptPQInnerDataWithRSA(context) {
    // Create the data with hash to be encrypt
    var hash = utility.createSHAHash(context.pqInnerData);
    var dataWithHash = Buffer.concat([hash, context.pqInnerData]);
    if (logger.isDebugEnabled()) {
        logger.debug('Data to be encrypted contains: hash(%s), pqInnerData(%s), total length %s',
            hash.length, context.pqInnerData.length, dataWithHash.length);
    }
    // Encrypt data with RSA
    context.encryptedData = security.cipher.rsaEncrypt(dataWithHash, context.publicKey);
    return context;
}
function encryptPQInnerDataWithRSA(context) {
    // Create the data with hash to be encrypt
    var hash = utility.createSHAHash(context.pqInnerData);
    var dataWithHash = Buffer.concat([hash, context.pqInnerData]);
    if (logger.isDebugEnabled()) {
        logger.debug('Data to be encrypted contains: hash(%s), pqInnerData(%s), total length %s',
            hash.length, context.pqInnerData.length, dataWithHash.length);
    }
    // Encrypt data with RSA
    context.encryptedData = security.cipher.rsaEncrypt(dataWithHash, context.publicKey);
    return context;
}
function encryptPQInnerDataWithRSA ( context ) { // Create the data with hash to be encrypt var hash = utility . createSHAHash ( context . pqInnerData ) ; var dataWithHash = Buffer . concat ( [ hash , context . pqInnerData ] ) ; if ( logger . isDebugEnabled ( ) ) { logger . debug ( 'Data to be encrypted contains: hash(%s), pqInnerData(%s), total length %s' , hash . length , context . pqInnerData . length , dataWithHash . length ) ; } // Encrypt data with RSA context . encryptedData = security . cipher . rsaEncrypt ( dataWithHash , context . publicKey ) ; return context ; }
Encrypt the pq_inner_data with RSA
Encrypt the pq_inner_data with RSA