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

Struct cthWrapper

cipher_suites.go:561–563  ·  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

559// cthWrapper wraps any hash.Hash that implements ConstantTimeSum, and replaces
560// with that all calls to Sum. It's used to obtain a ConstantTimeSum-based HMAC.
561type cthWrapper struct {
562 h constantTimeHash
563}
564
565func (c *cthWrapper) Size() int { return c.h.Size() }
566func (c *cthWrapper) BlockSize() int { return c.h.BlockSize() }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected