bcrypt/tests: Use common helper for testing different hash types.