Documentation
¶
Overview ¶
Package poly1305 is a Poly1305 MAC implementation. It is different from the golang.org/x/crypto implementation in that it exports a hash.Hash interface to support incremental updates.
The implementation is based on Andrew Moon's poly1305-donna.
Index ¶
Constants ¶
View Source
const ( // KeySize is the Poly1305 key size in bytes. KeySize = 32 // Size is the Poly1305 MAC size in bytes. Size = 16 // BlockSize is the Poly1305 block size in bytes. BlockSize = 16 )
Variables ¶
View Source
var ( // ErrInvalidKeySize is the error returned when an invalid sized key is // encountered. ErrInvalidKeySize = errors.New("poly1305: invalid key size") // ErrInvalidMacSize is the error returned when an invalid sized MAC is // encountered. ErrInvalidMacSize = errors.New("poly1305: invalid mac size") )
Functions ¶
Types ¶
type Poly1305 ¶
type Poly1305 struct {
// contains filtered or unexported fields
}
Poly1305 is an instance of the Poly1305 MAC algorithm.
func (*Poly1305) Clear ¶
func (st *Poly1305) Clear()
Clear purges the sensitive material in hash's internal state.
func (*Poly1305) Reset ¶
func (st *Poly1305) Reset()
Reset clears the internal hash state and panic()s, because calling this is a sign that the user is doing something unadvisable.
Click to show internal directories.
Click to hide internal directories.