Initialize hash array.
Mode is now checked, only client and server is allowed.