0.0.5 • Published 3 years ago

reverse-md5 v0.0.5

Weekly downloads
605
License
-
Repository
github
Last release
3 years ago

reverse-md5

Build Status Dependency Status devDependency Status

demo

demo-md5

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 to true. - lettersLower - Enables reverseMd5 to look for lowercase letters, a-z. Defaults to true. - numbers - Enables reverseMd5 to look for numbers, 0-9. Defaults to true. - special - Enables reverseMd5 to look for special characters, I.E. punctuation, symbols, brackets. Defaults to false. - whitespace - Enables reverseMd5 to look for whitespace, I.E. spaces, tabs, newlines. Defaults to true. - maxLen - The maximum length of string that the module searches for. Defaults to 8.
  • 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

license

MIT