package poly1305

Import Path
	vendor/golang.org/x/crypto/poly1305 (on golang.org and go.dev)

Dependency Relation
	imports 3 packages, and imported by one package

Involved Source Files
	    bits_go1.13.go
	d-> poly1305.go
	    sum_amd64.go
	    sum_generic.go
	    sum_amd64.s

Exported Type Names

type MAC (struct) MAC is an io.Writer computing an authentication tag of the data written to it. MAC cannot be used like common hash.Hash implementations, because using a poly1305 key twice breaks its security. Therefore writing data to a running MAC after calling Sum or Verify causes it to panic. (*T) Size() int (*T) Sum(b []byte) []byte (*T) Verify(expected []byte) bool (*T) Write(p []byte) (n int, err error) *T : io.Writer func New(key *[32]byte) *MAC
Exported Values
func New(key *[32]byte) *MAC New returns a new MAC computing an authentication tag of all data written to it with the given key. This allows writing the message progressively instead of passing it as a single slice. Common users should use the Sum function instead. The key must be unique for each message, as authenticating two different messages with the same key allows an attacker to forge messages at will.
func Sum(out *[16]byte, m []byte, key *[32]byte) Sum generates an authenticator for msg using a one-time key and puts the 16-byte result into out. Authenticating two different messages with the same key allows an attacker to forge messages at will.
const TagSize = 16 TagSize is the size, in bytes, of a poly1305 authenticator.
func Verify(mac *[16]byte, m []byte, key *[32]byte) bool Verify returns true if mac is a valid authenticator for m with the given key.