aesgcm

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: May 8, 2026 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Overview

Package aesgcm provides AES-GCM cipher helpers without colliding with crypto/aes.

New code should import this package instead of the legacy pki/aes path:

import "github.com/InsideGallery/core/pki/aesgcm"

Compatibility: github.com/InsideGallery/core/pki/aes remains available for existing consumers. Prefer New and KeySize constants from aesgcm so AES-GCM usage has an algorithm-specific import path.

Index

Constants

View Source
const (
	// KeySize32 is the 256-bit AES key size in bytes.
	KeySize32 = legacy.AES32
	// KeySize24 is the 192-bit AES key size in bytes.
	KeySize24 = legacy.AES24
	// KeySize16 is the 128-bit AES key size in bytes.
	KeySize16 = legacy.AES16
)

Variables

View Source
var ErrInvalidKeySize = legacy.ErrInvalidAESSize

ErrInvalidKeySize reports an unsupported AES key size.

Functions

This section is empty.

Types

type Cipher

type Cipher = legacy.AES

Cipher encrypts and decrypts data with AES-GCM.

func New

func New(size int) (*Cipher, error)

New returns an AES-GCM cipher with a randomly generated key.

Jump to

Keyboard shortcuts

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