enc

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Overview

Package enc provides interfaces for Content Encryption.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Algorithm

type Algorithm interface {
	// GenerateCEK generates a new CEK(Content Encryption Key).
	GenerateCEK() ([]byte, error)

	// IVSice generates a new IV(Initialization Vector).
	GenerateIV() ([]byte, error)

	// Decrypt decrypts and verifies ciphertext.
	Decrypt(cek, iv, aad, ciphertext, authTag []byte) (plaintext []byte, err error)

	// Encrypt encrypts and signs plaintext.
	Encrypt(cek, iv, aad, plaintext []byte) (ciphertext, authTag []byte, err error)
}

Algorithm is an algorithm for encryption.

Jump to

Keyboard shortcuts

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