Documentation
¶
Overview ¶
Copyright 2016 The Go Authors. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
Index ¶
Constants ¶
View Source
const ( // KeySize is the size of the key used by this AEAD, in bytes. KeySize = 32 // NonceSize is the size of the nonce used with the standard variant of this // AEAD, in bytes. // // Note that this is too short to be safely generated at random if the same // key is reused more than 2³² times. NonceSize = 12 // NonceSizeX is the size of the nonce used with the XChaCha20-Poly1305 // variant of this AEAD, in bytes. NonceSizeX = 24 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Chacha20poly1305 ¶
type Chacha20poly1305 struct {
// contains filtered or unexported fields
}
func NewPartialChacha20Poly1305 ¶
func NewPartialChacha20Poly1305(key []byte) (*Chacha20poly1305, error)
New returns a ChaCha20-Poly1305 AEAD that uses the given 256-bit key.
func (*Chacha20poly1305) OpenWithoutCheck ¶
func (c *Chacha20poly1305) OpenWithoutCheck(dst, nonce, ciphertext []byte) []byte
type Gcm ¶
type Gcm struct {
// contains filtered or unexported fields
}
Gcm represents a Galois Counter Mode with a specific key. See https://csrc.nist.gov/groups/ST/toolkit/BCM/documents/proposedmodes/gcm/gcm-revised-spec.pdf
func (*Gcm) OpenWithoutCheck ¶
type PartialAEAD ¶
Click to show internal directories.
Click to hide internal directories.