summaryrefslogtreecommitdiff
path: root/modules/caddyhttp/caddyauth/hashes.go
diff options
context:
space:
mode:
authorMatthew Holt <mholt@users.noreply.github.com>2019-12-23 12:45:35 -0700
committerMatthew Holt <mholt@users.noreply.github.com>2019-12-23 12:45:35 -0700
commit95ed603de79c66ff76bfe7e42986a2fc8c7a1fa4 (patch)
tree1a788b8eba98f0c2e69e5816bac9c7cc09aca96f /modules/caddyhttp/caddyauth/hashes.go
parentcbb405f6aaee046c9de9ffb4f07ca824d9eedeb1 (diff)
Improve godocs all around
These will be used in the new automated documentation system
Diffstat (limited to 'modules/caddyhttp/caddyauth/hashes.go')
-rw-r--r--modules/caddyhttp/caddyauth/hashes.go14
1 files changed, 11 insertions, 3 deletions
diff --git a/modules/caddyhttp/caddyauth/hashes.go b/modules/caddyhttp/caddyauth/hashes.go
index 3ca5116..5a3173e 100644
--- a/modules/caddyhttp/caddyauth/hashes.go
+++ b/modules/caddyhttp/caddyauth/hashes.go
@@ -52,9 +52,17 @@ func (BcryptHash) Compare(hashed, plaintext, _ []byte) (bool, error) {
// ScryptHash implements the scrypt KDF as a hash.
type ScryptHash struct {
- N int `json:"N,omitempty"`
- R int `json:"r,omitempty"`
- P int `json:"p,omitempty"`
+ // scrypt's N parameter. If unset or 0, a safe default is used.
+ N int `json:"N,omitempty"`
+
+ // scrypt's r parameter. If unset or 0, a safe default is used.
+ R int `json:"r,omitempty"`
+
+ // scrypt's p parameter. If unset or 0, a safe default is used.
+ P int `json:"p,omitempty"`
+
+ // scrypt's key length parameter (in bytes). If unset or 0, a
+ // safe default is used.
KeyLength int `json:"key_length,omitempty"`
}