This commit is contained in:
Tanner Nelson 2017-03-03 19:52:14 +01:00
parent 868d71bd7d
commit 2ec2cd438a
No known key found for this signature in database
GPG Key ID: 9C24375C64856B76
1 changed files with 5 additions and 2 deletions

View File

@ -96,13 +96,16 @@ let drop = try Droplet()
drop.hash = CryptoHasher(
hmac: .sha256,
encoding: .hex,
key: "password".bytes
key: "password".makeBytes()
)
```
## BCryptHasher
BCrypt is a password hashing function that automatically incorporates salts to increase security. It also offers a configurable work factor that increases the amount of computational resources required to generate a hash ([key stretching](https://en.wikipedia.org/wiki/Key_stretching)).
BCrypt is a password hashing function that automatically incorporates salts and offers a configurable work factor. The work factor can be used to increase the computation required to generate a hash
!!! seealso
Learn more about [key stretching](https://en.wikipedia.org/wiki/Key_stretching) on Wikipedia.
### Configuration