Versions in this module Expand all Collapse all v1 v1.50.0 Sep 24, 2021 v1.41.0 Sep 23, 2021 Changes in this version + const GcmTagSize + const MsgLenFieldSize + var ErrAuth = errors.New("message authentication failed") + func CounterSide(c []byte) core.Side + func NewConn(c net.Conn, side core.Side, recordProtocol string, key []byte, ...) (net.Conn, error) + func ParseFramedMsg(b []byte, maxLen uint32) ([]byte, []byte, error) + func RegisterProtocol(protocol string, f ALTSRecordFunc) error + func SliceForAppend(in []byte, n int) (head, tail []byte) + type ALTSRecordCrypto interface + Decrypt func(dst, ciphertext []byte) ([]byte, error) + Encrypt func(dst, plaintext []byte) ([]byte, error) + EncryptionOverhead func() int + func NewAES128GCM(side core.Side, key []byte) (ALTSRecordCrypto, error) + func NewAES128GCMRekey(side core.Side, key []byte) (ALTSRecordCrypto, error) + type ALTSRecordFunc func(s core.Side, keyData []byte) (ALTSRecordCrypto, error) + type Counter struct + func CounterFromValue(value []byte, overflowLen int) (c Counter) + func NewInCounter(s core.Side, overflowLen int) (c Counter) + func NewOutCounter(s core.Side, overflowLen int) (c Counter) + func (c *Counter) Inc() + func (c *Counter) Value() ([]byte, error) + type KeySizeError int + func (k KeySizeError) Error() string