aessha2

package
v0.23.2 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2025 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package aessha2 implements the m.megolm.v1.aes-sha2 encryption algorithm described in Section 10.12.4.3 in the Spec

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AESSHA2

type AESSHA2 struct {
	// contains filtered or unexported fields
}

func NewAESSHA2

func NewAESSHA2(secret, info []byte) (AESSHA2, error)

func (*AESSHA2) Decrypt

func (a *AESSHA2) Decrypt(ciphertext []byte) ([]byte, error)

func (*AESSHA2) Encrypt

func (a *AESSHA2) Encrypt(plaintext []byte) ([]byte, error)

func (*AESSHA2) MAC

func (a *AESSHA2) MAC(ciphertext []byte) ([]byte, error)

func (*AESSHA2) VerifyMAC

func (a *AESSHA2) VerifyMAC(ciphertext, theirMAC []byte) (bool, error)

Jump to

Keyboard shortcuts

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