Swiftpack.co - Loupehope/PasswordChecker as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by Loupehope.
Loupehope/PasswordChecker 1.4.0
PasswordChecker
⭐️ 5
🕓 39 weeks ago
.package(url: "https://github.com/Loupehope/PasswordChecker.git", from: "1.4.0")

PasswordChecker

PasswordChecker is a wrapper over zxcvbn
Dropbox's online zxcvbn test - https://lowe.github.io/tryzxcvbn/

Example

let passwordChecker = try? PasswordChecker()

let password = "2-Ubvrr23dsf2"
let result = passwordChecker?.getPasswordScore(password, userInputs: ["Vlad", "2-Ubvrr23"])

switch result {
case let .success(passwordInfo):
    debugPrint(passwordInfo.score)
    
case let .failure(error):
    debugPrint(error.localizedDescription)
    
case .none:
    assertionFailure("PasswordChecker is not initialised!")
}

Installation

Cocoapods

PasswordChecker is available through CocoaPods. To install it, simply add the following line to your Podfile: pod 'PasswordChecker'

Swift Package Manager

File > Swift Packages > Add Package Dependency

OR

Update dependencies in Package.swift

dependencies: [
  .package(url: "https://github.com/Loupehope/PasswordChecker.git", .exact("1.1.0")),
],

Useful scripts:

  • ./scripts/lint.sh - run project's linter

GitHub

link
Stars: 5
Last commit: 39 weeks ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Release Notes

1.4.0
39 weeks ago

Add ability to use cocoapods - #5

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics