Expand description

Library that should allow quick implementation of tools that are compatible with PasswordMaker Pro.

It forms the core of an upcoming PasswordMaker Pro compatible Sailfish OS App (as of yet unnamed). This library intentionally does not depend on any specific implementation of the cryptographic hashes it relies on. To see an example of how to integrate with the Rust Crypto Hashes, see the integration tests.

Description

There are two types in this library, you’ll likely want to use: UrlParsing and PasswordMaker.

UrlParsing takes a user-supplied string, and generates another string from it, according to the passed in settings. The idea is to strip unwanted parts of an URI when generating passwords. For instance, you usually want the same result for all sub-pages of a given website.

PasswordMaker is the main part of this crate. You give it settings similar to those of a PasswordMaker Pro profile, and it gives you a password that’s hopfully the same you’d get from PasswordMaker Pro for the same input.

Structs

A cached instance of validated PasswordMaker settings. See new for details.
Settings for the parsing of the user’s input URL. This is used to generate the data parameter for PasswordMaker.

Enums

Error returned if the supplied input did not meet expectations.
The hash algorithm to use, as shown in the GUI of the JavaScript edition of PasswordMaker Pro.
The leet level to use. The higher the value, the more obfuscated the results.
How to handle the URL protocol, or the absence of it, during UrlParsing.
Error returned if creation of a PasswordMaker object failed due to invalid settings.
When the Leet replacement as illustrated in LeetLevel is applied.

Traits

Trait you need to implement for the various hash functions you need to provide. Currently only a single function, that computes the hash of a string slice, is needed. This may change in a later version.
List of hash functions to use. Trait may change in later versions to include constructors for actual hasher objects.
Trait your Md4 hash function needs to implement.
Trait your Md5 hash function needs to implement.
Trait your Ripemd160 hash function needs to implement.
Trait your Sha1 hash function needs to implement.
Trait your Sha256 hash function needs to implement.