Documentation
¶
Index ¶
Constants ¶
View Source
const ( MagicPrefix = "envx" KeySize = 32 // 256-bit key )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AESEncryptor ¶
type AESEncryptor struct{}
AESEncryptor implements the Encryptor interface using AES-GCM
func NewAESEncryptor ¶
func NewAESEncryptor() *AESEncryptor
NewAESEncryptor creates a new AES encryptor
func (*AESEncryptor) Decrypt ¶
func (e *AESEncryptor) Decrypt(ciphertext string, key []byte) (string, error)
Decrypt decrypts a ciphertext string using AES-GCM decryption
func (*AESEncryptor) Encrypt ¶
func (e *AESEncryptor) Encrypt(plaintext string, key []byte) (string, error)
Encrypt encrypts a plaintext string using AES-GCM encryption
func (*AESEncryptor) IsEncrypted ¶
func (e *AESEncryptor) IsEncrypted(value string) bool
IsEncrypted checks if a value appears to be encrypted
Click to show internal directories.
Click to hide internal directories.