MCPcopy Create free account
hub / github.com/XTLS/Go / sha1Hash

Function sha1Hash

key_agreement.go:106–112  ·  view source on GitHub ↗

sha1Hash calculates a SHA1 hash over the given byte slices.

(slices [][]byte)

Source from the content-addressed store, hash-verified

104
105// sha1Hash calculates a SHA1 hash over the given byte slices.
106func sha1Hash(slices [][]byte) []byte {
107 hsha1 := sha1.New()
108 for _, slice := range slices {
109 hsha1.Write(slice)
110 }
111 return hsha1.Sum(nil)
112}
113
114// md5SHA1Hash implements TLS 1.0's hybrid hash function which consists of the
115// concatenation of an MD5 and SHA1 hash.

Callers 2

md5SHA1HashFunction · 0.85
hashForServerKeyExchangeFunction · 0.85

Calls 2

WriteMethod · 0.45
SumMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…