crypto

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EncryptionKey = []byte("authsome-notification-key-32b") // Must be 32 bytes for AES-256

EncryptionKey is the encryption key for provider credentials In production, this should be loaded from environment variables or a key management service

Functions

func DecryptConfig

func DecryptConfig(config map[string]interface{}) (map[string]interface{}, error)

DecryptConfig decrypts a provider configuration map

func EncryptConfig

func EncryptConfig(config map[string]interface{}) (map[string]interface{}, error)

EncryptConfig encrypts a provider configuration map

func GenerateEncryptionKey

func GenerateEncryptionKey() ([]byte, error)

GenerateEncryptionKey generates a new random encryption key

func SetEncryptionKey

func SetEncryptionKey(key []byte) error

SetEncryptionKey sets a custom encryption key This should be called at application startup with a key from environment

Types

This section is empty.

Jump to

Keyboard shortcuts

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