added hash functions for authentication etc