LogViewer
A modern log viewer with AI-assisted analysis (Qt 6)
Loading...
Searching...
No Matches
util::KeyEncryption Class Reference

Simple API key encryption/decryption utility. More...

#include <KeyEncryption.hpp>

Collaboration diagram for util::KeyEncryption:
Collaboration graph

Static Public Member Functions

static std::string Encrypt (const std::string &plaintext)
 Encrypt an API key.
 
static std::string Decrypt (const std::string &ciphertext)
 Decrypt an API key.
 
static bool IsEncrypted (const std::string &value)
 Check if a string appears to be encrypted.
 

Detailed Description

Simple API key encryption/decryption utility.

Provides basic obfuscation for API keys stored in config files. Uses XOR cipher with device-specific key generation. Not military-grade encryption, but prevents casual reading of keys.

Member Function Documentation

◆ Decrypt()

std::string util::KeyEncryption::Decrypt ( const std::string &  ciphertext)
static

Decrypt an API key.

Parameters
ciphertextBase64-encoded encrypted key
Returns
Decrypted plain API key
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Encrypt()

std::string util::KeyEncryption::Encrypt ( const std::string &  plaintext)
static

Encrypt an API key.

Parameters
plaintextThe plain API key
Returns
Base64-encoded encrypted key
Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsEncrypted()

bool util::KeyEncryption::IsEncrypted ( const std::string &  value)
static

Check if a string appears to be encrypted.

Parameters
valueString to check
Returns
True if the string looks like an encrypted value

The documentation for this class was generated from the following files: