subtle

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: May 8, 2023 License: Apache-2.0 Imports: 1 Imported by: 5

Documentation

Overview

Package subtle provides subtle implementations of the AEAD primitive.

Index

Constants

View Source
const (
	// AES128Size value in number of bytes.
	AES128Size = subtle.AES128Size
	// AES192Size value in number of bytes.
	AES192Size = subtle.AES192Size
	// AES256Size value in number of bytes.
	AES256Size = subtle.AES256Size
)
View Source
const (
	// AESCBCIVSize is the IV size that this implementation supports.
	AESCBCIVSize = subtle.AESCBCIVSize
)

Variables

This section is empty.

Functions

func ValidateAESKeySize

func ValidateAESKeySize(sizeInBytes uint32) error

ValidateAESKeySize checks if the given key size is a valid AES key size.

func ValidateAESKeySizeForGoJose

func ValidateAESKeySizeForGoJose(sizeInBytes uint32) error

ValidateAESKeySizeForGoJose checks if the given key size is a valid AES key size.

Types

type AESCBC

type AESCBC = subtle.AESCBC

AESCBC is an implementation of AEAD interface.

func NewAESCBC

func NewAESCBC(key []byte) (*AESCBC, error)

NewAESCBC returns an AESCBC instance. The key argument should be the AES key, either 16, 24 or 32 bytes to select AES-128, AES-192 or AES-256.

type AESCBCHMAC

type AESCBCHMAC = subtle.AESCBCHMAC

AESCBCHMAC is an implementation of AEAD interface.

func NewAESCBCHMAC

func NewAESCBCHMAC(key []byte) (*AESCBCHMAC, error)

NewAESCBCHMAC returns an AES CBC HMAC instance. The key argument should be the AES key, either 16, 24 or 32 bytes to select AES-128, AES-192 or AES-256. ivSize specifies the size of the IV in bytes.

Jump to

Keyboard shortcuts

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