|
dbeaver-creds 0.1.1
Decrypt DBeaver credentials-config.json.
|
Go to the source code of this file.
Enumerations | |
| enum | dbeaver_credentials_error { DBEAVER_CREDENTIALS_OK = 0 , DBEAVER_CREDENTIALS_PATH_UNAVAILABLE , DBEAVER_CREDENTIALS_FILE_READ_FAILED , DBEAVER_CREDENTIALS_INVALID_CIPHERTEXT , DBEAVER_CREDENTIALS_DECRYPTION_FAILED , DBEAVER_CREDENTIALS_EMPTY_PAYLOAD , DBEAVER_CREDENTIALS_OUT_OF_MEMORY } |
Error codes written through the err out-parameter of get_dbeaver_credentials. More... | |
Functions | |
| char * | get_dbeaver_credentials (const char *path, enum dbeaver_credentials_error *err) |
| Read DBeaver's credentials-config.json, decrypt it, and return the JSON payload as a malloc-allocated, NUL-terminated UTF-8 string. | |
Error codes written through the err out-parameter of get_dbeaver_credentials.
| char * get_dbeaver_credentials | ( | const char * | path, |
| enum dbeaver_credentials_error * | err ) |
Read DBeaver's credentials-config.json, decrypt it, and return the JSON payload as a malloc-allocated, NUL-terminated UTF-8 string.
If path is NULL, the platform-default location is used:
The caller owns the returned buffer and must release it with free().
| [in] | path | const char * - Filesystem path to the credentials file, or NULL to use the platform-default location. |
| [out] | err | enum dbeaver_credentials_error * - Receives the result code (DBEAVER_CREDENTIALS_OK on success, otherwise one of the failure codes). May be NULL to ignore. |