Documentation ¶
Index ¶
Constants ¶
View Source
const ( CipherID = "xc20" MACID = "p1305" )
Variables ¶
This section is empty.
Functions ¶
func ParsePoly1305Tag ¶
ParsePoly1305Tag loads a poly1305 tag from string
Types ¶
type Config ¶
Config are xchacha20 params
func ParseConfig ¶
ParseConfig loads a xchacha20 config from params string
type Poly1305Auth ¶
type Poly1305Auth struct {
// contains filtered or unexported fields
}
Poly1305Auth computes a poly1305 auth tag
func NewFromConfig ¶
func NewFromConfig(config Config) (h2streamcipher.KeyStream, *Poly1305Auth, error)
NewFromConfig creates a xchacha20-poly1305 cipher from config
func NewFromParams ¶
func NewFromParams(params string) (h2streamcipher.KeyStream, *Poly1305Auth, error)
NewFromParams creates a xchacha20-poly1305 cipher from params
func (*Poly1305Auth) Close ¶
func (a *Poly1305Auth) Close() error
Close writes the number of bytes of the input to the hash and should be called after writing all the input. This prevents length extension attacks.
Click to show internal directories.
Click to hide internal directories.