If you put above code to your sources then you can call it with monster name as parameter:
uint32_t key = getHash(name);
player->getStorage(key, value);
// or
player->getStorage(getHash(name), value);
Remember that it returns a number from 16,777,619 to 4,294,967,295 based on the provided...