RandomPasswordGenerator

0.1.0

Customizable Random Password Generator in Swift
yukanamori/RandomPasswordGenerator

What's New

2024-03-09T12:28:14Z

RandomPasswordGenerator

build

RandomPasswordGenerator is a Swift library for generating random passwords with specified length, character types, and excluded characters.

Features

  • Generate random passwords of a specified length.
  • Include or exclude specific types of characters (digits, uppercase, lowercase, special characters). Special characters refer to non-space symbols in the ASCII code.
  • Exclude specific characters from the generated password.

Installation

This library can be installed using the Swift Package Manager. To do so, add the following to your Package.swift file:

dependencies: [
    .package(url: "https://github.com/yukanamori/RandomPasswordGenerator", from: "0.1.0")
]

Usage

import Foundation

// Create a new password generator
let generator = RandomPasswordGenerator(length: 10, characterTypes: [.digits, .uppercase, .lowercase])

do {
    // Generate a random password
    let password = try generator.generate()
    print(password)
} catch {
    print("An error occurred: \(error)")
}

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Description

  • Swift Tools 5.7.0
View More Packages from this Author

Dependencies

  • None
Last updated: Mon Mar 18 2024 10:52:20 GMT-0900 (Hawaii-Aleutian Daylight Time)