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
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.
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.
 |
The pages are generated with Golds v0.1.6. (GOOS=darwin GOARCH=amd64)
Golds is a Go 101 project and developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |