MCPcopy Create free account
hub / github.com/mattn/go-sqlite3 / CryptEncoderSSHA384

Function CryptEncoderSSHA384

sqlite3_func_crypt.go:94–101  ·  view source on GitHub ↗

CryptEncoderSSHA384 encodes a password with SHA384 with the configured salt

(salt string)

Source from the content-addressed store, hash-verified

92// CryptEncoderSSHA384 encodes a password with SHA384
93// with the configured salt
94func CryptEncoderSSHA384(salt string) func(pass []byte, hash interface{}) []byte {
95 return func(pass []byte, hash interface{}) []byte {
96 s := []byte(salt)
97 p := append(pass, s...)
98 h := sha512.Sum384(p)
99 return h[:]
100 }
101}
102
103// CryptEncoderSHA512 encodes a password with SHA512
104func CryptEncoderSHA512(pass []byte, hash interface{}) []byte {

Callers 2

TestCryptEncodersFunction · 0.85
OpenMethod · 0.85

Calls

no outgoing calls

Tested by 1

TestCryptEncodersFunction · 0.68