| 213 | } |
| 214 | |
| 215 | void Options_GetSecure(const char* opt, cc_string* dst) { |
| 216 | cc_uint8 data[1500]; |
| 217 | int dataLen; |
| 218 | cc_string raw; |
| 219 | cc_result res; |
| 220 | |
| 221 | Options_UNSAFE_Get(opt, &raw); |
| 222 | if (!raw.length) return; |
| 223 | if (raw.length > 2000) Process_Abort("too large to base64"); |
| 224 | |
| 225 | dataLen = Convert_FromBase64(raw.buffer, raw.length, data); |
| 226 | res = Platform_Decrypt(data, dataLen, dst); |
| 227 | if (res) Platform_Log2("Error %e decrypting option %c", &res, opt); |
| 228 | } |
no test coverage detected