Added initial implementation of generateHash()