Optimised password util