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

Function CryptEncoderSSHA1

sqlite3_func_crypt.go:60–67  ·  view source on GitHub ↗

CryptEncoderSSHA1 encodes a password with SHA1 with the configured salt.

(salt string)

Source from the content-addressed store, hash-verified

58// CryptEncoderSSHA1 encodes a password with SHA1 with the
59// configured salt.
60func CryptEncoderSSHA1(salt string) func(pass []byte, hash any) []byte {
61 return func(pass []byte, hash any) []byte {
62 s := []byte(salt)
63 p := append(pass, s...)
64 h := sha1.Sum(p)
65 return h[:]
66 }
67}
68
69// CryptEncoderSHA256 encodes a password with SHA256
70func CryptEncoderSHA256(pass []byte, hash any) []byte {

Callers 2

TestCryptEncodersFunction · 0.85
OpenMethod · 0.85

Calls

no outgoing calls

Tested by 1

TestCryptEncodersFunction · 0.68