Discover Packages
github.com/stefanopulze/hap
chacha20poly1305
package
Version:
v0.0.2
Opens a new window with list of versions in this module.
Published: Jan 1, 2023
License: Apache-2.0
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 0
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.