cryptoutil

package
v0.0.0-...-0ccc1a6 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AESDecrypt

func AESDecrypt(ciphertext, key []byte) ([]byte, error)

AESDecrypt decrypts an encrypted payload with an AES cipher. The decryption algorithm makes three assumptions: 1. ciphertext is aligned to the standard AES block size 2. ciphertext is padded using PKCS#7 3. the IV is prepended to ciphertext

func AESEncrypt

func AESEncrypt(plaintext, key []byte) ([]byte, error)

AESEncrypt encrypts a payload with an AES cipher. The returned ciphertext has three notable properties: 1. ciphertext is aligned to the standard AES block size 2. ciphertext is padded using PKCS#7 3. IV is prepended to the ciphertext

Types

This section is empty.

Jump to

Keyboard shortcuts

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