有没有办法利用 Bcrypt 与 Swift 进行 iOS 开发?

Is there a way to utilize Bcrypt for iOS development with Swift?

我一直在寻找一个库、cocoapod 或其他允许我使用 Swift 在 iOS 中实现 Bcrypt 的东西。

BCryptSwift - cocoapod 写在 Swift.

还有一个 cocoapod BCrypt, it's actually a version used in the Perfect(Swift-服务器端工具包),但在 iOS 中用作 cocoa pod依赖。

示例用法:

import BCrypt

let password = "mypassword"
do {
    let salt = try BCrypt.Salt()
    let hashed = try BCrypt.Hash(password, salt: salt)
    print("Hashed result is: \(hashed)")
}
catch {
    print("An error occured: \(error)")
}