Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 3598735

Browse files
Mention correct algorithm in function docs.
CryptEncoder SHA384 and SHA512 variants (with and without salt) were incorrectly documented as using SHA256.
1 parent 1a378fb commit 3598735

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

‎sqlite3_func_crypt.go‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,13 @@ func CryptEncoderSSHA256(salt string) func(pass []byte, hash interface{}) []byte
8383
}
8484
}
8585

86-
// CryptEncoderSHA384 encodes a password with SHA256
86+
// CryptEncoderSHA384 encodes a password with SHA384
8787
func CryptEncoderSHA384(pass []byte, hash interface{}) []byte {
8888
h := sha512.Sum384(pass)
8989
return h[:]
9090
}
9191

92-
// CryptEncoderSSHA384 encodes a password with SHA256
92+
// CryptEncoderSSHA384 encodes a password with SHA384
9393
// with the configured salt
9494
func CryptEncoderSSHA384(salt string) func(pass []byte, hash interface{}) []byte {
9595
return func(pass []byte, hash interface{}) []byte {
@@ -100,13 +100,13 @@ func CryptEncoderSSHA384(salt string) func(pass []byte, hash interface{}) []byte
100100
}
101101
}
102102

103-
// CryptEncoderSHA512 encodes a password with SHA256
103+
// CryptEncoderSHA512 encodes a password with SHA512
104104
func CryptEncoderSHA512(pass []byte, hash interface{}) []byte {
105105
h := sha512.Sum512(pass)
106106
return h[:]
107107
}
108108

109-
// CryptEncoderSSHA512 encodes a password with SHA256
109+
// CryptEncoderSSHA512 encodes a password with SHA512
110110
// with the configured salt
111111
func CryptEncoderSSHA512(salt string) func(pass []byte, hash interface{}) []byte {
112112
return func(pass []byte, hash interface{}) []byte {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /