Password Generator

This is a quick & dirty port of the PWGEN source code from https://github.com/tytso/pwgen so that it can be compiled in ILE C and called from ILE RPG on IBM i.

This software is open source, released under the GNU GPL license. I claim no ownership of this software, and do not offer technical support. For full details of ownership and license, see the preceding link to GitHub.

Download
 
Package Download File Size Format Platform
pwgen utility pwgen.savf 64 KB Save File IBM i 6.1+
 
Requirements

This software requires IBM i 6.1 (V6R1) or newer. To compile it, you will need the CL, ILE RPG and ILE C compilers.

Instructions:

  1. Upload the Save File to IBM i using FTP in BINARY mode. Please it in a *SAVF object named PWGEN in the QGPL library.

  2. Log on to your i with an account with sufficient authority to create a library and restore the save file.

  3. type the following:

    • CRTLIB PWGEN
    • RSTOBJ OBJ(*ALL) SAVLIB(PWGEN) DEV(*SAVF) SAVF(QGPL/PWGEN)
    • CHGCURLIB PWGEN
    • CRTCLPGM BUILDPWGEN SRCFILE(PWGEN/QCLSRC)
    • CALL BUILDPWGEN

The BUILDPWGEN program compiles everything into your current library, and that is why you needed to run CHGCURLIB, above. Once the build is complete, you can set your current library to something else, as desired.

The build program has created two *PGM objects. PWGEN is the main utility offered on GitHub and may be invoked via the CALL command or QShell interface. I would recommend the latter, as it is more in-line with the way it was designed to work.

The other *PGM object is called RPGEX1, and is an example of calling the password generator code from an RPG program. Look at the source in the QRPGLESRC file to see how it works.