Fixed a bug in the maximum password cipher. And added a test for it.