envelope

package
v0.0.0-...-8dc8ab2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 23, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ENVELOPE_TYPE_SIZE = 1
	NONCE_SIZE         = 12
	KEY_SIZE           = 32
)

Variables

This section is empty.

Functions

func DecryptBase64String

func DecryptBase64String(b64msg string, aead cipher.AEAD, priv []byte) ([]byte, error)

func DecryptKind0Message

func DecryptKind0Message(msg []byte, aead cipher.AEAD) ([]byte, error)

func DecryptKind1Message

func DecryptKind1Message(msg []byte, priv []byte) ([]byte, error)

func DecryptMessage

func DecryptMessage(msg []byte, aead cipher.AEAD, priv []byte) ([]byte, error)

func DeriveHKDFKey

func DeriveHKDFKey(secret []byte) ([]byte, error)

func EncryptKind0Message

func EncryptKind0Message(msg []byte, aead cipher.AEAD) ([]byte, error)

func EncryptKind0MessageWithNonce

func EncryptKind0MessageWithNonce(msg []byte, aead cipher.AEAD, nonce []byte) ([]byte, error)

func EncryptKind1Message

func EncryptKind1Message(msg []byte, selfPriv []byte, peerPub []byte) ([]byte, error)

func GenerateSymmetricKeyFromKeyAgreement

func GenerateSymmetricKeyFromKeyAgreement(selfPriv []byte, peerPub []byte) ([]byte, error)

func GetMessageKind

func GetMessageKind(bs []byte) byte

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL