Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewEAXDecrypter ¶
NewEAXDecrypter creates and returns a new EAX decrypter using the given cipher c, initialization vector iv, associated data hdr, and tag length tagBytes. The encrypter's Read method decrypts and returns data read from r. At r's EOF, the encrypter checks the final authenticating tag and returns an EAXTagError if the tag is invalid. In that case, the message should be discarded. Note that the data stream returned from Read cannot be assumed to be valid, authenticated data until Read returns 0, nil to signal the end of the data.
func NewEAXEncrypter ¶
func NewEAXEncrypter(c cipher.Block, iv []byte, hdr []byte, tagBytes int, w io.Writer) io.WriteCloser
NewEAXEncrypter creates and returns a new EAX encrypter using the given cipher c, initialization vector iv, associated data hdr, and tag length tagBytes. The encrypter's Write method encrypts the data it receives and writes that data to w. The encrypter's Close method writes a final authenticating tag to w.
Types ¶
type EAXTagError ¶
An EAXTagError is returned when the message has failed to authenticate, because the tag at the end of the message stream (Read) does not match the tag computed from the message itself (Computed).
func (*EAXTagError) Error ¶
func (e *EAXTagError) Error() string