MCPcopy Create free account
hub / github.com/BernardoGiordano/Checkpoint / deviceSecret

Method deviceSecret

switch/source/script/scripthost.cpp:285–302  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers

nothing calls this directly

Calls 1

warningFunction · 0.85

Tested by

no test coverage detected