aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormattn <mattn.jp@gmail.com>2018-09-16 13:50:09 +0900
committerGitHub <noreply@github.com>2018-09-16 13:50:09 +0900
commit593fde6929df5acf164ede346d6b0a98597ed9d2 (patch)
treea4162f4512c52d0d6d1f33428b708f708b61a06c
parentMerge pull request #631 from mattn/fix-build (diff)
parentMention correct algorithm in function docs. (diff)
downloadgolite-593fde6929df5acf164ede346d6b0a98597ed9d2.tar.gz
golite-593fde6929df5acf164ede346d6b0a98597ed9d2.tar.xz
Merge pull request #633 from israel-lugo/patch-1
Mention correct algorithm in function docs.
-rw-r--r--sqlite3_func_crypt.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/sqlite3_func_crypt.go b/sqlite3_func_crypt.go
index 3774a97..d397c8c 100644
--- a/sqlite3_func_crypt.go
+++ b/sqlite3_func_crypt.go
@@ -83,13 +83,13 @@ func CryptEncoderSSHA256(salt string) func(pass []byte, hash interface{}) []byte
}
}
-// CryptEncoderSHA384 encodes a password with SHA256
+// CryptEncoderSHA384 encodes a password with SHA384
func CryptEncoderSHA384(pass []byte, hash interface{}) []byte {
h := sha512.Sum384(pass)
return h[:]
}
-// CryptEncoderSSHA384 encodes a password with SHA256
+// CryptEncoderSSHA384 encodes a password with SHA384
// with the configured salt
func CryptEncoderSSHA384(salt string) func(pass []byte, hash interface{}) []byte {
return func(pass []byte, hash interface{}) []byte {
@@ -100,13 +100,13 @@ func CryptEncoderSSHA384(salt string) func(pass []byte, hash interface{}) []byte
}
}
-// CryptEncoderSHA512 encodes a password with SHA256
+// CryptEncoderSHA512 encodes a password with SHA512
func CryptEncoderSHA512(pass []byte, hash interface{}) []byte {
h := sha512.Sum512(pass)
return h[:]
}
-// CryptEncoderSSHA512 encodes a password with SHA256
+// CryptEncoderSSHA512 encodes a password with SHA512
// with the configured salt
func CryptEncoderSSHA512(salt string) func(pass []byte, hash interface{}) []byte {
return func(pass []byte, hash interface{}) []byte {