API for password encryption and password matching.