1.0.0 • Published 9 months ago

@exerciseftui/mightyshield v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
9 months ago

MightyShield CyberSecurity Library

MightyShield is a comprehensive JavaScript library designed to provide essential cybersecurity functionalities for your applications. It offers a range of modules that can be used to enhance the security of your web and mobile applications.

This library is proudly developed and maintained by EXERCISE FTUI, a dedicated team passionate about cybersecurity and software development.

Installation

You can install the MightyShield library using npm:

npm install mightyshield

Usage

Basic Usage

import { PasswordStrengthChecker } from 'mightyshield';

const passwordChecker = new PasswordStrengthChecker()
  .minLength(8)
  .maxLength(30)
  .haveUppercase()
  .haveLowercase()
  .haveNumbers()
  .haveSymbols();

// Validate Password
const validationResult = passwordChecker.validate('SecurePa$$w0rd');

// 
const passwordScore = passwordChecker.calculateScore(password);
console.log('Password Score:', passwordScore);

Methods

  • minLength(length: number): this: Specifies the minimum length requirement for the password.
  • maxLength(length: number): this: Specifies the maximum length requirement for the password.
  • haveUppercase(): this: Requires the password to contain at least one uppercase letter.
  • haveLowercase(): this: Requires the password to contain at least one lowercase letter.
  • haveNumbers(): this: Requires the password to contain at least one digit.
  • haveSymbols(): this: Requires the password to contain at least one special character.
  • validate(password: string): { valid: boolean; unmetRules: string[] }: Validates the password against the defined criteria and returns validation result.
  • calculateScore(password: string): number: Calculates the password score based on predefined criteria. Contributing Contributions are welcome! Feel free to open issues and pull requests for improvements, bug fixes, or new features.

License

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

Please make sure to adapt this README.md to fit

1.0.0

9 months ago