| 283 | int extdataDelete(uint32_t) override { return -1; } |
| 284 | |
| 285 | int deviceSecret(uint8_t* out, int want) override |
| 286 | { |
| 287 | if (want == DeviceKeySourceBest || want == DeviceKeySourceNxSpl) { |
| 288 | if (splSecret(out)) { |
| 289 | return DeviceKeySourceNxSpl; |
| 290 | } |
| 291 | if (want == DeviceKeySourceNxSpl) { |
| 292 | return -1; |
| 293 | } |
| 294 | Logging::warning("script seal: SPL device key unavailable, falling back to the serial number"); |
| 295 | } |
| 296 | if (want == DeviceKeySourceBest || want == DeviceKeySourceNxCal) { |
| 297 | if (serialSecret(out)) { |
| 298 | return DeviceKeySourceNxCal; |
| 299 | } |
| 300 | } |
| 301 | return -1; |
| 302 | } |
| 303 | |
| 304 | bool randomBytes(void* out, size_t size) override |
| 305 | { |