reverse-md5
v0.0.5
Published
Finds a string that hashes to a given md5 hash
Downloads
3,015
Readme
reverse-md5
demo
api
var ReverseMd5 = require('reverse-md5')
var rev = ReverseMd5(opts)
ReverseMd5
is a constructor that returns a function.
opts
is an object, and it has these properties:lettersUpper
- Enables reverseMd5 to look for uppercase letters, A-Z. Defaults totrue
.lettersLower
- Enables reverseMd5 to look for lowercase letters, a-z. Defaults totrue
.numbers
- Enables reverseMd5 to look for numbers, 0-9. Defaults totrue
.special
- Enables reverseMd5 to look for special characters, I.E. punctuation, symbols, brackets. Defaults tofalse
.whitespace
- Enables reverseMd5 to look for whitespace, I.E. spaces, tabs, newlines. Defaults totrue
.maxLen
- The maximum length of string that the module searches for. Defaults to8
.
- Returns
rev()
.
var obj = rev(hash, [opts])
hash
is an md5 hash string.opts
is the same as the constructor's opts.- Returns an object with the following properties:
str
- The string that was hashed. E.g. 'hi', 'wat'elapsed
- The amount of time that elapsed, in seconds. (Floating point.) E.g. 0.309135532, 2.912352039
example
var rev = ReverseMd5({
lettersUpper: false,
lettersLower: true,
numbers: true,
special: false,
whitespace: true,
maxLen: 12
})
rev('49f68a5c8493ec2c0bf489821c21fc3b') //returns something like: {str:'hi', elapsed: 0.309135532}
install
Install with NPM
npm install reverse-md5