Added hasing based on key and cipher/