MCPcopy
hub / github.com/XTLS/REALITY / cthWrapper

Struct cthWrapper

cipher_suites.go:577–579  ·  view source on GitHub ↗

cthWrapper wraps any hash.Hash that implements ConstantTimeSum, and replaces with that all calls to Sum. It's used to obtain a ConstantTimeSum-based HMAC.

Source from the content-addressed store, hash-verified

575// cthWrapper wraps any hash.Hash that implements ConstantTimeSum, and replaces
576// with that all calls to Sum. It's used to obtain a ConstantTimeSum-based HMAC.
577type cthWrapper struct {
578 h constantTimeHash
579}
580
581func (c *cthWrapper) Size() int { return c.h.Size() }
582func (c *cthWrapper) BlockSize() int { return c.h.BlockSize() }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected