pub fn hash<P: AsRef<[u8]>>(password: P, cost: u32) -> BcryptResult<String>
Generates a password hash using the cost given. The salt is generated randomly using the OS randomness