From 95ed603de79c66ff76bfe7e42986a2fc8c7a1fa4 Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Mon, 23 Dec 2019 12:45:35 -0700 Subject: Improve godocs all around These will be used in the new automated documentation system --- modules/caddyhttp/caddyauth/hashes.go | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'modules/caddyhttp/caddyauth/hashes.go') 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"` } -- cgit v1.2.3