aes

package
v1.0.2065 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package aes implements the PMAC MAC with the AES. AES-PMAC is specified in RFC 4493 and RFC 4494.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(key []byte) (hash.Hash, error)

New returns a hash.Hash computing the AES-PMAC checksum.

func NewWithTagSize

func NewWithTagSize(key []byte, tagsize int) (hash.Hash, error)

NewWithTagSize returns a hash.Hash computing the AES-PMAC checksum with the given tag size. The tag size must between the 1 and the cipher's block size.

func Sum

func Sum(msg, key []byte, tagsize int) ([]byte, error)

Sum computes the AES-PMAC checksum with the given tagsize of msg using the cipher.Block.

func Verify

func Verify(mac, msg, key []byte, tagsize int) bool

Verify computes the AES-PMAC checksum with the given tagsize of msg and compares it with the given mac. This functions returns true if and only if the given mac is equal to the computed one.

Types

This section is empty.

Jump to

Keyboard shortcuts

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