Documentation
¶
Index ¶
- func AES_CTR_Decrypt(encryptedData []byte) ([]byte, error)
- func AES_CTR_Encrypt(plainText []byte) ([]byte, error)
- func DecryptPlainTextPassword(username string) (string, error)
- func IsConfigChanged(src, dest string) (bool, error)
- func IsEnvVarSet(key string) (string, error)
- func IsFileExist(fpath string) bool
- func LogRequestSafely(logger *zap.SugaredLogger, operation string, data map[string]interface{})
- func ValidateAndSetAESKey() error
- type FileInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AES_CTR_Decrypt ¶
AES_CTR_Decrypt decrypts base64 encoded string and returns plaintext (for backward compatibility)
func AES_CTR_Encrypt ¶
AES_CTR_Encrypt encrypts plaintext and returns base64 encoded string (for backward compatibility)
func DecryptPlainTextPassword ¶ added in v1.1.1
func IsConfigChanged ¶
IsConfigChanged reports whether src and dest config files are equal. Two config files are equal when they have the same file contents and Unix permissions. The owner, group, and mode must match. It return false in other cases.
func IsEnvVarSet ¶ added in v1.1.1
func LogRequestSafely ¶ added in v1.1.1
func LogRequestSafely(logger *zap.SugaredLogger, operation string, data map[string]interface{})
LogRequestSafely logs request information with sensitive data masked
func ValidateAndSetAESKey ¶
func ValidateAndSetAESKey() error
ValidateAndSetAESKey validates the AES key from environment variable and sets it for use This function should be called during application startup (e.g., in main.go) Returns error if key is missing or invalid