Latest 0.1.3
License MIT
Platforms ios 8.0



PwnedPasswords implements a client for’s Pwned Passwords API v2 in Swift.

  • Its only dependencies are Foundation and CommonCrypto.
  • Does not disclose the password being checked to third parties. Only the first 5 characters of the password sha1 hash are disclosed (See k-Anonymity.)
  • Can target iOS, macOS, tvOS, and watchOS.


    PwnedPasswords.shared.check(password: "password1") { (result) in

        switch result {

            case .success( let count ):

                if count > 0 {

                  print( "This password has been found (count) times in compromised accounts" )

                } else {

                  print( "This password wasn't found to be compromised." )


            case .failure:

                print( "This password could not be checked at this time" )



Installation: CocoaPods

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

pod 'SwiftPwnedPasswords'

Installation: Manual

Copy PwnedPasswords.swift to your project.


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

Latest podspec

    "name": "SwiftPwnedPasswords",
    "version": "0.1.3",
    "summary": "A client for's compromised passwords API. Written in Swift, with no dependencies.",
    "description": "PwnedPasswords implements a dependency-free, Swift native client for's [Pwned Passwords API v2](",
    "homepage": "",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    "authors": {
        "0x6A75616E": "[email protected]"
    "source": {
        "git": "",
        "tag": "0.1.3"
    "platforms": {
        "ios": "8.0"
    "source_files": "src/**/*",
    "swift_versions": "5.0"

Pin It on Pinterest

Share This