Documentation ¶
Overview ¶
Package auth provides functions to quickly compute and verify 128 bit authentication tags for arbitrary long messages.
Therefore this package uses SipHash-128 with c=2 and d=4.
Index ¶
Constants ¶
View Source
const ( // TagSize is the size of a SipHash-128 authentication tag in bytes. TagSize = 16 // KeySize is the size of a SipHash-128 key in bytes. KeySize = 16 // BlockSize is the blocksize of SipHash-128 in bytes. BlockSize = 8 )
Variables ¶
This section is empty.
Functions ¶
func GenerateKey ¶
GenerateKey returns a random SipHash-128 key. Therefore the given reader must return random data. This function returns a non-nil error if the given reader fails to provide enough data. In this case the returned key is nil must not used.
func New ¶
New returns a new hash.Hash computing the SipHash-128 authentication tag with the given context and key. The context must be 8 and the key must be 16 bytes long. Otherwise this function panics.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.