crypto

package
v0.1.20 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2025 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CredentialEncryptor

type CredentialEncryptor struct {
	// contains filtered or unexported fields
}

CredentialEncryptor handles encryption and decryption of S3 credentials

func NewCredentialEncryptor

func NewCredentialEncryptor(base64Key string) (*CredentialEncryptor, error)

NewCredentialEncryptor creates a new encryptor from a base64-encoded key

func (*CredentialEncryptor) Decrypt

func (ce *CredentialEncryptor) Decrypt(encryptedBase64 string) (string, error)

Decrypt decrypts a credential string using AES-256-GCM

func (*CredentialEncryptor) DecryptCredentials

func (ce *CredentialEncryptor) DecryptCredentials(encryptedAccessKey, encryptedSecretKey string) (accessKey, secretKey string, err error)

DecryptCredentials decrypts both access key and secret key

func (*CredentialEncryptor) Encrypt

func (ce *CredentialEncryptor) Encrypt(plaintext string) (string, error)

Encrypt encrypts a credential string using AES-256-GCM

func (*CredentialEncryptor) EncryptCredentials

func (ce *CredentialEncryptor) EncryptCredentials(accessKey, secretKey string) (encryptedAccessKey, encryptedSecretKey string, err error)

EncryptCredentials encrypts both access key and secret key

Jump to

Keyboard shortcuts

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