public void decode(ByteBuffer buffer, @NonNull CodecCallback callback) throws IOException {
        int verifyResult = SSLUtils.verifyPacket(buffer);
        if (!mHandshakeStarted) {
            if (verifyResult == SSLUtils.PACKET_NOT_ENCRYPTED) {
                callback.onDecrypt(buffer);
                return;
            }
        }
        if (verifyResult == SSLUtils.PACKET_NOT_ENOUGH) {
            callback.onPending(buffer);
            return;
        }
        decode(createEngine(mSSLEngineFactory), buffer, callback);
    }
Handshake with the client or server and try to decode a SSL encrypt packet.

@param buffer The SSL encrypt packet.
@param callback A callback to observe actions and receive output packets.
@throws IOException If an I/O error has occurred.
netbare-core/src/main/java/com/github/megatronking/netbare/ssl/SSLCodec.java