Latest 1.0.2
Homepage https://github.com/2-much-loop/PwGen
License MIT
Platforms ios 8.0, osx 10.10
Authors

Version
License
Platform

Simple yet cryptographically secure password generator library in Swift.

Usage

Import library

import PwGen

Generate password

Default password (12 characters) made of symbols, letters and/or numbers:

let password: String = try! PwGen().generate()

Password of size 20 that will use only letters and/or numbers:

let password: String = try! PwGen().ofSize(20).withoutSymbols().generate()

Symbols, letters, numbers with added characters:

let password = try! PwGen().addCharacters(["€","£"]).generate()

Lowercase letters, numbers + symbols without some characters:

let password = try! PwGen().withoutCharacters(["!","L"," "]).withoutUppercase().generate()

10 random passwords using the same pattern:

let generator = PwGen().withoutCharacter("a").withoutSymbols()
for _ in 0..<10 {
    let password = try! generator.generate()
    print(password)
}

Check characters that will be used

let generator = PwGen().withoutSymbols()
print(generator.getCharacters())

Installation

PwGen is available through CocoaPods.

To install it, simply add the following line to your Podfile:

pod 'PwGen'

Then run:

pod install

License

PwGen is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "PwGen",
    "version": "1.0.2",
    "summary": "Simple yet cryptographically secure password generator library in Swift.",
    "swift_version": "4.1",
    "homepage": "https://github.com/2-much-loop/PwGen",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Maxime Guisset": "[email protected]"
    },
    "source": {
        "git": "https://github.com/2-much-loop/PwGen.git",
        "tag": "1.0.2"
    },
    "social_media_url": "https://twitter.com/2_m_loop",
    "platforms": {
        "ios": "8.0",
        "osx": "10.10"
    },
    "source_files": "PwGen/**/*"
}

Pin It on Pinterest

Share This