Forgot to change 'socket' to 'sock' when adapting pseudocode.
Added client-side abstraction class.
Added new to/from string methods to ICryptosystem.