Generates an alphanumeric password of a specified length