PasswordAssistant

last edited August 17, 2006 17:11:12 (71.118.237.176)
CocoaDev is sponsored by: Panic: Shockingly good Mac software!

The Password Assistant is the window that tells you the security of a password entered into an NSSecureTextField. In 10.3, it features a numeric indicator (from 0-128, though it can go higher for very long passwords), and a bar (like a progress bar) that is red for insecure passwords up to green for very secure passwords. It also provides tips such as 'This is a word in the dictionary', 'This is too similar to your old password', etc. In 10.4, it can also generate random and memorably-random passwords.

The Password Assistant can be accessed through two Apple applications:

  • The Keychain Assistant provides the Password Assistant in its 'Change Password for Keychain' panel.
  • The Disk Images Helper (invoked by hdiutil and Disk Utility) provides the Password Assistant in its panel for setting the password on an encrypted disk image.

In both cases, the Password Assistant is accessed by clicking the round 'i' button (10.3) or rectangular button with a key icon (10.4) in the lower-left corner of the password panel.


UndocumentedGoodness:SecurityInterface.framework - Panel to test the strength of a password

Here's how to use the Password Assistant in your own app:

Unfortunately, InterfaceBuilder doesn't seem able to determine what frameworks you have set up in Xcode, so you won't be able to use the Test Interface command with this (IB will log a message saying that there is no SFPasswordAssistantInspectorController class and that it will use NSObject instead, and the 'i' button won't work). You will need to build the application and test within it.

--boredzo

I have an example implementation, with source, as Password Assistant: http://www.codepoetry.net/products/passwordassistant --codepoet

I find that highly amusing (and cool), considering that I too wrote an example implementation -- in fact, that's how I discovered everything above. :)

One of these days, I should update my implementation for Tiger and put it online again. It was for awhile, but then my old web host went away.

--boredzo