Added createHash() method.