BCrypt
Implementation of BCrypt encryption in Swift
Install / Use
/learn @Pepijn98/BCryptREADME
BCrypt
Usage
Hash
import BCrypt
let bytes = try BCrypt.hash(message: "test")
print(bytes.string())
Hash with salt
import BCrypt
let salt = Salt(cost: 14)
let bytes = try BCrypt.hash(message: "test", with: salt)
print(bytes.string())
Compare
import BCrypt
let bytes = try BCrypt.hash(message: "test")
let result = try BCrypt.compare(message: "test", against: bytes)
print(result) // => True
