Closed EpicUsername12 closed 7 months ago
Example usage:
int main(int argc, char *argv[]) { consoleInit(NULL); PadState pad; padConfigureInput(1, HidNpadStyleSet_NpadStandard); padInitializeDefault(&pad); nsInitialize(); fsInitialize(); FsDeviceOperator deviceOperator; fsOpenDeviceOperator(&deviceOperator); FsGameCardHandle gcHandle = {-1}; fsDeviceOperatorGetGameCardHandle(&deviceOperator, &gcHandle); u8 cert[0x200]; // output fsDeviceOperatorGetGameCardDeviceCertificate(&deviceOperator, &gcHandle, cert, sizeof(cert), sizeof(cert)); // From application authentication /v%i/challenge endpoint (AAuth, used to authenticate gamecards, they can complete a proprietary challenge to prove they are legit) u8 seed[15] = {...}; u8 value[16] = {...}; u8 challenge[0x58]; // output fsDeviceOperatorChallengeCardExistence(&deviceOperator, &gcHandle, challenge, sizeof(challenge), seed, sizeof(seed), value, sizeof(value)); fsDeviceOperatorClose(&deviceOperator); fsExit(); nsEnsureGameCardAccess(); nsExit(); consoleExit(NULL); return 0; }
Example usage: