Corrected the key exchange operation, added a isKeyExchange method

The isKeyExchange method is a simple way of determining if the message
received is a key exchange. In the future this should be improved
to use something much more robust & secure.