shortened key generation for hash