You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

secure-password-gen

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

secure-password-gen

A simple npm package for generating random passwords with customizable options.

1.0.8
latest
Source
npmnpm
Version published
Weekly downloads
320
-8.57%
Maintainers
1
Weekly downloads
 
Created
Source

Secure Password Generator

A simple npm package for generating random passwords with customizable options.

Installation

You can install the secure-password-gen package via npm:

npm install secure-password-gen

Usage


const generatePassword = require('secure-password-gen');

// Generate a password with default settings (12 characters, including uppercase, lowercase, numbers, and symbols)
const password = generatePassword();
console.log("Default Password:", password);

// Generate a password with custom length and options
const customPassword = generatePassword(16, true, true, true, false);
console.log("Custom Password:", customPassword);

Documentation

The generatePassword function accepts the following parameters:

  • length (optional): The length of the password (default is 12).
  • includeUppercase (optional): Whether to include uppercase letters (default is true).
  • includeLowercase (optional): Whether to include lowercase letters (default is true).
  • includeNumbers (optional): Whether to include numbers (default is true).
  • includeSymbols (optional): Whether to include symbols (default is true).

License

This project is licensed under the MIT License - see the LICENSE file for details.

In this documentation:

  • The Installation section explains how to install the package using npm.
  • The Usage section provides examples of how to use the secure-password-gen function with default and custom options.
  • The License section states the license under which the package is distributed.

Keywords

password-generator

FAQs

Package last updated on 07 Apr 2024

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