centralize hash generation