Module: PassForge

Defined in:
lib/passforge.rb,
lib/passforge/batch.rb,
lib/passforge/pattern.rb,
lib/passforge/version.rb,
lib/passforge/analyzer.rb,
lib/passforge/charsets.rb,
lib/passforge/wordlist.rb,
lib/passforge/generator.rb,
lib/passforge/passphrase.rb,
lib/passforge/pronounceable.rb,
lib/passforge/breach_checker.rb

Overview

PassForge - A comprehensive password generation toolkit

Examples:

Generate a random password

PassForge.random(length: 16, symbols: true)

Generate a passphrase

PassForge.passphrase(words: 4, separator: '-')

Defined Under Namespace

Modules: Charsets, Wordlist Classes: Analyzer, Batch, BreachChecker, Error, Generator, Passphrase, Pattern, Pronounceable

Constant Summary collapse

VERSION =
"1.1.2"

Class Method Summary collapse

Class Method Details

.analyze(password) ⇒ Analyzer::Result

Analyze password strength



45
46
47
# File 'lib/passforge.rb', line 45

def self.analyze(password)
  Analyzer.analyze(password)
end

.batch(count, type = :random, **options) ⇒ Array<String>

Generate multiple passwords



75
76
77
# File 'lib/passforge.rb', line 75

def self.batch(count, type = :random, **options)
  Batch.generate(count, type, **options)
end

.breached?(password) ⇒ Hash

Check if password has been breached



52
53
54
# File 'lib/passforge.rb', line 52

def self.breached?(password)
  BreachChecker.check(password)
end

.passphrase(**options) ⇒ String

Generate a passphrase



38
39
40
# File 'lib/passforge.rb', line 38

def self.passphrase(**options)
  Passphrase.generate(**options)
end

.pattern(pattern) ⇒ String

Generate password from pattern



66
67
68
# File 'lib/passforge.rb', line 66

def self.pattern(pattern)
  Pattern.generate(pattern)
end

.personal(keywords, **options) ⇒ String

Generate a personalized password



83
84
85
# File 'lib/passforge.rb', line 83

def self.personal(keywords, **options)
  Personal.generate(keywords, **options)
end

.pronounceable(**options) ⇒ String

Generate a pronounceable password



59
60
61
# File 'lib/passforge.rb', line 59

def self.pronounceable(**options)
  Pronounceable.generate(**options)
end

.random(length: 12, **options) ⇒ String

Generate a random password



31
32
33
# File 'lib/passforge.rb', line 31

def self.random(length: 12, **options)
  Generator.generate(length, **options)
end