package cryptoutil
import "github.com/coreos/pkg/cryptoutil"
Index ¶
- func AESDecrypt(ciphertext, key []byte) ([]byte, error)
- func AESEncrypt(plaintext, key []byte) ([]byte, error)
Functions ¶
func AESDecrypt ¶
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 ¶
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
Source Files ¶
- Version
- v0.0.0-20240122114842-bbd7aa9bf6fb (latest)
- Published
- Jan 22, 2024
- Platform
- linux/amd64
- Imports
- 4 packages
- Last checked
- 2 weeks ago –
Tools for package owners.