{"id":28395505,"url":"https://github.com/mehrankmlf/passguard","last_synced_at":"2025-06-27T04:32:09.123Z","repository":{"id":192755316,"uuid":"674987353","full_name":"mehrankmlf/PassGuard","owner":"mehrankmlf","description":"PassGuard is designed to assess the strength of password strings.","archived":false,"fork":false,"pushed_at":"2024-03-22T05:33:26.000Z","size":550,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-15T05:19:20.738Z","etag":null,"topics":["ios","password","password-cracker","password-safety","password-strength","passwordchecker","passwords","passwordstrength","passwordstrengthbar-library","security","security-tools","security-vulnerability","securityios"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mehrankmlf.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-08-05T11:55:09.000Z","updated_at":"2025-04-16T10:56:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"17346839-d679-4f8b-a80d-4aa024c7226d","html_url":"https://github.com/mehrankmlf/PassGuard","commit_stats":null,"previous_names":["mehrankmlf/passguard"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/mehrankmlf/PassGuard","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mehrankmlf%2FPassGuard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mehrankmlf%2FPassGuard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mehrankmlf%2FPassGuard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mehrankmlf%2FPassGuard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mehrankmlf","download_url":"https://codeload.github.com/mehrankmlf/PassGuard/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mehrankmlf%2FPassGuard/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262188396,"owners_count":23272341,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ios","password","password-cracker","password-safety","password-strength","passwordchecker","passwords","passwordstrength","passwordstrengthbar-library","security","security-tools","security-vulnerability","securityios"],"created_at":"2025-05-31T19:40:23.570Z","updated_at":"2025-06-27T04:32:09.090Z","avatar_url":"https://github.com/mehrankmlf.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"![passwrod strength meter](https://github.com/mehrankmlf/PassGuard/assets/24524023/61a13094-2507-416a-9375-8f279f4fb03f)\n\n# PassGuard\n\nThe `PassGuard` provides visual feedback to help users create stronger passwords by identifying common mistakes. The PassGuard uses 16 algorithms of different complexities. Each algorithm assigns a score to the input password using a specific formula. These scores are then combined to calculate a final score, which can range from 0 to 100.\n\n`The PassGuard runs on the user device as a framework and does not store or send user password over the network.`\n\n# Requirements\n\n`PassGuard` works on iOS 13.0+. It depends on the following Apple frameworks, which should already be included with most Xcode templates:\n\n* Foundation.framework\n* UIKit.framework\n* SwiftUI.framework\n* Combine.framework `optional`\n\n## Adding PassGuard to your project\n\n### CocoaPods\n\n[CocoaPods](http://cocoapods.org) is the recommended way to add PassGuard to your project.\n\n1. Add a pod entry for PassGuard to your Podfile `pod 'PassGuard'\n2. Install the pod(s) by running `pod install`.\n3. Include PassGuard wherever you need it with `#import PassGuard`.\n\n```ruby\nplatform :ios, '13.0'\nuse_frameworks!\n\ntarget 'MyApp' do\n    pod 'PassGuard'\nend\n```\n\n### Swift Package Manager\n\nYou can use The Swift Package Manager to install PassGuard by adding the proper description to your Package.swift file:\n\n```swift\n// swift-tools-version:4.0\nimport PackageDescription\n\nlet package = Package(\n    name: \"YOUR_PROJECT_NAME\",\n    dependencies: [\n        .package(url: \"https://github.com/mehrankmlf/PassGuard.git\", from: \"1.0.8\"),\n    ]\n)\n```\n\nThen run swift build whenever you get prepared.\n\n## Sample\n\nYou can create your custom UI based on the project.\n\n![Simulator Screen Recording - iPhone SE (3rd generation) - 2023-09-07 at 00 09 20](https://github.com/mehrankmlf/PassGuard/assets/24524023/404e42e8-338f-4b8c-addc-2ad7be0bea18)\n\n## Usage\n\n(see sample Xcode project in /Example)\n\n#### Initialization\n\n```swift\nimport PassGuard\n```\n#### Text Publisher in UIKit\n\nWe have a Combine text publisher that allows us to stream user input from the UITextField, and there are additional solutions to capture user input efficiently when using UIKit. PassGuard offers this straightforward approach.\n\n```swift\ntxtPassword.passGuardTextPublisher\n      .sink { [weak self] password in\n\t\t  // password\n           }\n       .store(in: \u0026cancellables)\n```\n\n#### Init PassGuard\n\nTo use PassGuard, you should create an instance from the framework to measure the user's entered password strength.\n\n```swift\nlet passGuard = PassGuard(password: password)\n```\n\n#### Returns\n\nIn this version, PassGuard provides three options for building the UI responsible for displaying password details to the end user.\n\n1. Strength Description: \"Too Short\", \"Very Weak\", \"Weak\", \"Medium\", \"Strong\", \"Very Strong\". The six-level return is determined by the password score and strength calculated by PassGuard. You can customize these six strings as I will explain below.\n2. Strength Color: The framework returns six colors in a spectrum ranging from red to green.\n3. Strenght Score: The framework returns a score calculated using the 16 algorithms provided by PassGuard.\n4. Strenght Type: The framework returns an enum to identify the actual level of password strength. The enum cases are tooShort, veryWeak, weak, medium, strong, veryStrong which you can use to get the current state of PassGuard.\n\n```swift\nlet passGuard = PassGuard(password: password)\nself?.lblStrenght.text = passGuard.strengthDescription\nself?.lblStrenght.backgroundColor = passGuard.strengthColor\nself?.strenghtProgressView.progress = Float(passGuard.strengthScore) / 100\n```\n\nI have explained about PassGuard in the form of a post on Medium.\n\nhttps://medium.com/@mehran.kmlf/boost-your-password-security-with-passguard-framework-on-ios-7faa98cc7daa\n\n## Customize\n\nPassGuard allows you to customize the description returned by the framework based on the password score. You simply need to create a string array with six indexes and assign it to the PassGuard instance.\n\n```swift\nlet customDescriptions = [\"Way Too Short\",\n                                  \"Extremely Weak\",\n                                  \"Not So Strong\",\n                                  \"Fairly Strong\",\n                                  \"Super Strong\", \"Incredibly Strong\"]\n        txtPassword.passGuardTextPublisher\n            .sink { [weak self] password in\n                let passGuard = PassGuard(password: password,\n                                          customDescription: customDescriptions)\n                self?.lblStrenght.text = passGuard.strengthDescription\n                self?.lblStrenght.backgroundColor = passGuard.strengthColor\n                self?.strenghtProgressView.progress = Float(passGuard.strengthScore) / 100\n            }\n            .store(in: \u0026cancellables)\n```\n\n## Contributing\n\nContributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.\n\nIf you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag \"enhancement\". Don't forget to give the project a star! Thanks again!\n\n1. Fork the Project\n2. Create your Feature Branch (`git checkout -b feature/YourFeatureName`)\n3. Commit your Changes (`git commit -m 'Add some YourFeatureName'`)\n4. Push to the Branch (`git push origin feature/YourFeatureName`)\n5. Open a Pull Request\n\n\n## LICENSE\n\nMIT License\n\nCopyright (c) 2023 Related Code\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmehrankmlf%2Fpassguard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmehrankmlf%2Fpassguard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmehrankmlf%2Fpassguard/lists"}