Java/Eta/Core/src/main/java/com/refinitiv/eta/transport/CryptoHelper.java
private void decryptNetworkData(boolean keepReading) throws IOException
    {
        int bytesReadFromChannel = readFromChannel();
        // System.out.println("CryptoHelper   bytesReadFromChannel=="+bytesReadFromChannel);

        if (bytesReadFromChannel == -1)
            throw new IOException("Tunnel Channel disconnected");

        // make _netRecvBuffer readable
        _netRecvBuffer.flip();

        // decrypt (unwrap) the encrypted data into plaintext first decryption
        SSLEngineResult result = _engine.unwrap(_netRecvBuffer, _appRecvBuffer);

        // check the result of this decryption
        checkUnwrapEngineResultStatus(result);

        // move all decrypted data (that is in _netRecvBuffer) into _appRecvBuffer
        // i.e. keep decrypting (unwrap) until _netRecvBuffer is empty
        // or until we get a BUFFER_UNDERFLOW on the last decryption
        // (we need to later read more encrypted data from the channel into _netRecvBuffer)
        if (keepReading)
        {
            while ((_netRecvBuffer.remaining() != 0) && (result.getStatus() != Status.BUFFER_UNDERFLOW)
                   && (result.getStatus() != Status.BUFFER_OVERFLOW))
            {
                result = _engine.unwrap(_netRecvBuffer, _appRecvBuffer);
                // check the result of this decryption
                checkUnwrapEngineResultStatus(result);
            }
        }

        // setup _netRecvBuffer back to writable
        _netRecvBuffer.compact();
    }
// Decrypt (unwrap) the network encrypted data into application plaintext.
Decrypt (unwrap) the network encrypted data into application plaintext.
Decrypt ( unwrap ) the network encrypted data into application plaintext .
private void decryptNetworkData(boolean keepReading) throws IOException
    {
        int bytesReadFromChannel = readFromChannel();
        if (bytesReadFromChannel == -1)
            throw new IOException("Tunnel Channel disconnected");
        _netRecvBuffer.flip();
        SSLEngineResult result = _engine.unwrap(_netRecvBuffer, _appRecvBuffer);
        checkUnwrapEngineResultStatus(result);
        if (keepReading)
        {
            while ((_netRecvBuffer.remaining() != 0) && (result.getStatus() != Status.BUFFER_UNDERFLOW)
                   && (result.getStatus() != Status.BUFFER_OVERFLOW))
            {
                result = _engine.unwrap(_netRecvBuffer, _appRecvBuffer);
                checkUnwrapEngineResultStatus(result);
            }
        }
        _netRecvBuffer.compact();
    }
private void decryptNetworkData ( boolean keepReading ) throws IOException { int bytesReadFromChannel = readFromChannel ( ) ; if ( bytesReadFromChannel == - 1 ) throw new IOException ( "Tunnel Channel disconnected" ) ; _netRecvBuffer . flip ( ) ; SSLEngineResult result = _engine . unwrap ( _netRecvBuffer , _appRecvBuffer ) ; checkUnwrapEngineResultStatus ( result ) ; if ( keepReading ) { while ( ( _netRecvBuffer . remaining ( ) != 0 ) && ( result . getStatus ( ) != Status . BUFFER_UNDERFLOW ) && ( result . getStatus ( ) != Status . BUFFER_OVERFLOW ) ) { result = _engine . unwrap ( _netRecvBuffer , _appRecvBuffer ) ; checkUnwrapEngineResultStatus ( result ) ; } } _netRecvBuffer . compact ( ) ; }
Decrypt (unwrap) the network encrypted data into application plaintext.
Decrypt ( unwrap ) the network encrypted data into application plaintext .
// System.out.println("CryptoHelper   bytesReadFromChannel=="+bytesReadFromChannel); // make _netRecvBuffer readable // decrypt (unwrap) the encrypted data into plaintext first decryption // check the result of this decryption // move all decrypted data (that is in _netRecvBuffer) into _appRecvBuffer // i.e. keep decrypting (unwrap) until _netRecvBuffer is empty // or until we get a BUFFER_UNDERFLOW on the last decryption // (we need to later read more encrypted data from the channel into _netRecvBuffer) // check the result of this decryption // setup _netRecvBuffer back to writable