This commit is contained in:
Tanner Nelson 2017-03-24 10:40:28 +01:00
parent d62013cf28
commit e1670da000
No known key found for this signature in database
GPG Key ID: 9C24375C64856B76
2 changed files with 13 additions and 2 deletions

View File

@ -32,6 +32,15 @@ By default, Vapor uses a SHA-256 hasher. You can change this in the configuratio
### Configuration
`Config/droplet.json`
```json
{
...,
"hash": "crypto",
...
}
```
`Config/crypto.json`
```json
{
@ -102,14 +111,14 @@ drop.hash = CryptoHasher(
## BCryptHasher
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
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
To use the BCryptHasher instead of the CryptoHasher, change the `"hash"` key in the `droplet.json` configuration file.
To use the BCryptHasher change the `"hash"` key in the `droplet.json` configuration file.
`Config/droplet.json`
```json

View File

@ -32,10 +32,12 @@ pages:
- 'Group': 'routing/group.md'
- 'Collection': 'routing/collection.md'
- Fluent:
- 'Getting Started': 'fluent/getting-started.md'
- 'Driver': 'fluent/driver.md'
- 'Model': 'fluent/model.md'
- 'Query': 'fluent/query.md'
- 'Relation': 'fluent/relation.md'
- 'Package': 'fluent/package.md'
- Auth:
- 'Getting Started': 'auth/getting-started.md'
- 'Helper': 'auth/helper.md'