Function mosaic::dpapi_encrypt#
Defined in File dpapi_crypt.hpp
Function Documentation#
-
QString mosaic::dpapi_encrypt(const QString &plaintext)#
Encrypts
plaintextfor storage in a JSON settings file, using Windows DPAPI (CryptProtectData, current-user scope) on Windows builds.Returns a
"dpapi:v1:<base64>"marker string on success. Returnsplaintextunchanged (with a logged warning) if DPAPI itself fails, and on non-Windows builds (a plain pass-through, since DPAPI is Windows-only) — never silently drops the value, just leaves it unprotected rather than lose it. An empty string returns an empty string (nothing to protect).See also
dpapi_decrypt