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

Function CryptEncoderSSHA512

sqlite3_func_crypt.go:111–118  ·  view source on GitHub ↗

CryptEncoderSSHA512 encodes a password with SHA512 with the configured salt

(salt string)

Source from the content-addressed store, hash-verified

109// CryptEncoderSSHA512 encodes a password with SHA512
110// with the configured salt
111func CryptEncoderSSHA512(salt string) func(pass []byte, hash interface{}) []byte {
112 return func(pass []byte, hash interface{}) []byte {
113 s := []byte(salt)
114 p := append(pass, s...)
115 h := sha512.Sum512(p)
116 return h[:]
117 }
118}
119
120// EOF

Callers 2

TestCryptEncodersFunction · 0.85
OpenMethod · 0.85

Calls

no outgoing calls

Tested by 1

TestCryptEncodersFunction · 0.68