Skip to content

Native, dependency free Swift Bcrypt implementation

License

Notifications You must be signed in to change notification settings

ptoffy/swift-bcrypt

Repository files navigation

Swift Bcrypt

A native, dependency and Foundation free Swift implementation of the bcrypt password hashing algorithm, based on the OpenBSD implementation.

Installation

.package(url: "https://github.com/ptoffy/swift-bcrypt.git", branch: "main")
.product(name: "Bcrypt", package: "bcrypt")

Usage

import Bcrypt

let password = "password"
let hash = try Bcrypt.hash(password: password)
let isValid = try Bcrypt.verify(password: password, hash: hash)

About

Native, dependency free Swift Bcrypt implementation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages