Discover Packages
github.com/brutella/hc
crypto
chacha20poly1305
package
Version:
v1.2.5
Opens a new window with list of versions in this module.
Published: Jan 21, 2022
License: Apache-2.0
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 33
Opens a new window with list of known importers.
Documentation
Documentation
¶
func DecryptAndVerify(key, nonce, message []byte, mac [16]byte, add []byte) ([]byte, error)
func EncryptAndSeal(key, nonce, message []byte, add []byte) ([]byte, [16]byte, error)
DecryptAndVerify returns the chacha20 decrypted messages.
An error is returned when the poly1305 message authenticator (seal) could not be verified.
Nonce should be 8 byte.
EncryptAndSeal returns the chacha20 encrypted message and poly1305 message authentictor (also referred as seals)
Nonce should be 8 byte
Source Files
¶
Click to show internal directories.
Click to hide internal directories.