Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

passwords_generator

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

passwords_generator

  • 0.5.2
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

PasswordsGenerator

Enjoy using 😎

About

Generate human readable and easy to remember passwords

Installation

gem build passwords_generator.gemspec
gem install passwords_generator-0.5.0.gem

Usage

irb(main):001:0> require 'passwords_generator'
=> true

> PasswordGenerator.new.generate
=> "SYstdepo"

Options

  • Password length

    default: 8

    > PasswordGenerator.new(length: 3).generate
    => "AWy"
    
    > PasswordGenerator.new(length: 20).generate
    => "socieprIncommedozEn1"
    
  • Skip upper case

    default: false

    > PasswordGenerator.new(skip_upper_case: true).generate
    => "electrhu"
    
  • Without word

    default: false

    > PasswordGenerator.new(without_word: true).generate 
    => "oFoKusar"
    
  • Skip number

    default: false

    > PasswordGenerator.new(skip_number: true).generate
    => "JamYgrep"
    
  • Count upper case

    default: 2

    > PasswordGenerator.new(count_upper_case: 5).generate
    => "DRIveCOn"
    
    
  • Custom dictionary

    default: nil

    If you want to use your dictionary to generate passwords, pass the path to the text file to the gem. words must be separated by spaces

     sample.txt
     
    

    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

    > PasswordGenerator.new(custom_dictionary_file: 'sample.txt').generate
    => "LorEMcil"
    

Use many options at once!

> PasswordGenerator.new(length: 5, skip_upper_case: true).generate
=> "obopy"
> PasswordGenerator.new(length: 10, without_word: true, count_upper_case: 9).generate
=> "AXIMORUSEp"
> PasswordGenerator.new(custom_dictionary_file: 'sample.txt', skip_upper_case: true, length: 10, ).generate
=> "ullaad54mo"

Default settings

skip_upper_case: false,
without_word: false,
skip_number: false,
length: 8,
count_upper_case: 2,
custom_dictionary_file: nil

FAQs

Package last updated on 15 Oct 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc