private static short readShort(byte[] data, int offset) {
        int r = ((data[offset] & 0xFF) << 8) | (data[offset + 1] & 0xFF);
        return (short) r;
    }
Verify a packet to see whether it is a valid SSL packet.

@param buffer Encrypted SSL packet.
@return Verification result, one of {@link #PACKET_NOT_ENOUGH}, {@link #PACKET_NOT_ENCRYPTED},
and {@link #PACKET_SSL}.
netbare-core/src/main/java/com/github/megatronking/netbare/ssl/SSLUtils.java