moved: genRandomPassword