From e1670da00005d380c41fc8c67de940a9d9fd9eb8 Mon Sep 17 00:00:00 2001 From: Tanner Nelson Date: Fri, 24 Mar 2017 10:40:28 +0100 Subject: [PATCH] hash --- 2.0/docs/vapor/hash.md | 13 +++++++++++-- 2.0/mkdocs.yml | 2 ++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/2.0/docs/vapor/hash.md b/2.0/docs/vapor/hash.md index 93333d4c..8718c1c8 100644 --- a/2.0/docs/vapor/hash.md +++ b/2.0/docs/vapor/hash.md @@ -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 diff --git a/2.0/mkdocs.yml b/2.0/mkdocs.yml index 30ffdd15..8ff95797 100644 --- a/2.0/mkdocs.yml +++ b/2.0/mkdocs.yml @@ -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'