Use mem functions instead of str functions for binary password hash