Skip to content
password generator for OS X
Objective-C C++ Makefile
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
sf-pwgen-test Version 1.5 Apr 13, 2019
sf-pwgen.xcodeproj Version 1.5 Apr 13, 2019
.gitignore Ignore .dSYM Nov 16, 2016
.travis.yml Include Xcode scheme. Feb 1, 2015
Makefile Makefile: Use ?= for CC and CFLAGS. Mar 29, 2014 Bump version in README as well Apr 13, 2019
sf-pwgen.m Version 1.5 Apr 13, 2019


Build Status

sf-pwgen is a command line tool which generates passwords using the SecurityFoundation framework in macOS. It runs on Mountain Lion and later.

sf-pwgen 1.5: macOS password generator
Anders Bergh <>

usage: ./sf-pwgen [options]

Available options are:
  -a, --algorithm    Available algorithms: memorable, random, letters, alphanumeric, numbers.
                     The default is `memorable'.
  -c, --count        The number of passwords to generate (default: 5).
  -l, --length       Desired length of the generated passwords (default: 12).
  -L, --language     Generate passwords in a specified language.
                     Languages: en, de, es, fr, it, nl, pt, jp.
                     Note that this feature is broken and will produce garbage, bug: rdar://14889281
  -v, --version      Print the version number and exit.
  -h, --help         Print this message.


This project also includes SFPasswordAssistant.h, which is a reverse-engineered header for Apple's password assistant API (used in Keychain, etc). It should work on Snow Leopard and above.

To use it simply include SFPasswordAssistant.h in your project and link to SecurityFoundation.framework.

You can’t perform that action at this time.