Skip to content

cvwright/BCrypt

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BCrypt

Version License Platform

This is the Perfect-BCrypt module written in Swift and adopted to use in iOS as a CocoaPod dependency. The original module is being used in the Perfect Toolkit, see PerfectSideRepos/PerfectBCrypt for more details

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Usage

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)")
}

Requirements

  • iOS 10.0+
  • Xcode 10.1+
  • Swift 4.2+

Installation

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

pod 'BCrypt'

Author

Alexander Berkunov, [email protected]

License

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

About

Fork of PerfectBCrypt

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 87.9%
  • Swift 9.7%
  • Ruby 2.4%