Moved cipher generation into encryption module.
Added basic TCP connection stuff, including an example for encrypted connections.