![]() |
vitasdk
Documentation of the vitasdk
|
Exports for User. More...
Data Structures | |
| struct | SceQafTokenEnc |
| Unencrypted header and encrypted payload in the first 0x80 token bytes. More... | |
| struct | SceQafTokenEx |
Functions | |
| VITASDK_BUILD_ASSERT_EQ (0x80, SceQafTokenEnc) | |
| VITASDK_BUILD_ASSERT_EQ (0x180, SceQafTokenEx) | |
| int | sceSblQafManagerDeleteQafTokenForUser (void) |
| Does nothing on FW 3.60; does not delete a legacy QAF token. | |
| int | sceSblQafManagerGetQafNameForUser (char *buffer, SceSize max_length) |
| Copy up to 0x18 bytes of the active QAF profile name to user memory. | |
| int | sceSblQafManagerIsAllowKernelDebugForUser (void) |
| int | sceSblQafMgrDeleteQafToken2 (void) |
| Delete the stored extended QAF token and mark the NVS token slot empty. | |
| int | sceSblQafMgrGetQafName (char *buffer, SceSize max_length) |
| Validate the stored extended QAF token and return its active profile name. | |
| int | sceSblQafMgrGetQafToken2 (SceQafTokenEx *qaf_token) |
| Retrieve and transform the stored 0x180-byte extended QAF token. | |
| int | sceSblQafMgrIsAllowAllDebugMenuDisplay (void) |
| int | sceSblQafMgrIsAllowForceUpdate (void) |
| int | sceSblQafMgrIsAllowLimitedDebugMenuDisplay (void) |
| int | sceSblQafMgrIsAllowMinimumDebugMenuDisplay (void) |
| int | sceSblQafMgrIsAllowNonQAPup (void) |
| int | sceSblQafMgrIsAllowNpFullTest (void) |
| int | sceSblQafMgrIsAllowNpTest (void) |
| Check whether NP test mode is enabled. | |
| int | sceSblQafMgrIsAllowRemoteSysmoduleLoad (void) |
| int | sceSblQafMgrIsAllowScreenShotAlways (void) |
| int | sceSblQafMgrSetQafToken2 (const SceQafTokenEx *qaf_token) |
| Validate and install an extended QAF token. | |
Variables | |
| char | SceQafTokenEnc::magic [4] |
| Token magic. | |
| SceUInt32 | SceQafTokenEnc::qaf_version |
| QAF token version; FW 3.60 uses its second byte as the version counter. | |
| char | SceQafTokenEnc::qaf_name [0x18] |
| NUL-terminated or padded QAF profile name. | |
| SceUInt8 | SceQafTokenEnc::enc_data [0x60] |
| Encrypted token payload. | |
| SceUInt8 | SceQafTokenEx::token_data [0x80] |
| Input to sceSblQafMgrSetQafToken2 has the layout of SceQafTokenEnc. | |
| SceUInt8 | SceQafTokenEx::sig [0x100] |
| 0x100-byte token signature. | |
Exports for User.
Include the header file in your project:
Link the library to the executable:
| struct SceQafTokenEnc |
Unencrypted header and encrypted payload in the first 0x80 token bytes.
| Data Fields | ||
|---|---|---|
| char | magic[4] | Token magic. |
| SceUInt32 | qaf_version | QAF token version; FW 3.60 uses its second byte as the version counter. |
| char | qaf_name[0x18] | NUL-terminated or padded QAF profile name. |
| SceUInt8 | enc_data[0x60] | Encrypted token payload. |
| struct SceQafTokenEx |
| Data Fields | ||
|---|---|---|
| SceUInt8 | token_data[0x80] |
Input to sceSblQafMgrSetQafToken2 has the layout of SceQafTokenEnc. sceSblQafMgrGetQafToken2 transforms this region, but its output layout is not established. Encrypted token on input to sceSblQafMgrSetQafToken2. |
| SceUInt8 | sig[0x100] | 0x100-byte token signature. |
| VITASDK_BUILD_ASSERT_EQ | ( | 0x80 | , |
| SceQafTokenEnc | |||
| ) |
| VITASDK_BUILD_ASSERT_EQ | ( | 0x180 | , |
| SceQafTokenEx | |||
| ) |
| int sceSblQafManagerDeleteQafTokenForUser | ( | void | ) |
Does nothing on FW 3.60; does not delete a legacy QAF token.
0x80010058 on FW 3.60. | int sceSblQafManagerGetQafNameForUser | ( | char * | buffer, |
| SceSize | max_length | ||
| ) |
Copy up to 0x18 bytes of the active QAF profile name to user memory.
The calling process must be a system program. The function reads and writes the selected portion of buffer, so it must be both readable and writable. Values of max_length above 0x18 are treated as 0x18.
| [in,out] | buffer | - Required profile-name buffer. |
| [in] | max_length | - Number of bytes available in buffer; must be nonzero. |
| int sceSblQafManagerIsAllowKernelDebugForUser | ( | void | ) |
| int sceSblQafMgrDeleteQafToken2 | ( | void | ) |
Delete the stored extended QAF token and mark the NVS token slot empty.
The calling process must be a system program.
| int sceSblQafMgrGetQafName | ( | char * | buffer, |
| SceSize | max_length | ||
| ) |
Validate the stored extended QAF token and return its active profile name.
The calling process must be a system program. buffer must be readable and writable, and max_length must be at least 0x18. Exactly 0x18 bytes are transferred.
| [in,out] | buffer | - Required 0x18-byte profile-name buffer. |
| [in] | max_length | - Buffer capacity; must be at least 0x18. |
| int sceSblQafMgrGetQafToken2 | ( | SceQafTokenEx * | qaf_token | ) |
Retrieve and transform the stored 0x180-byte extended QAF token.
The calling process must be a system program. When the NVS empty flag is clear, the first 0x80 bytes and the 0x100-byte signature are read from NVS. Otherwise a token filled with zeros is used. qaf_sm command 13 then transforms the complete token before it is copied to user memory.
| [out] | qaf_token | - Required output token. |
| int sceSblQafMgrIsAllowAllDebugMenuDisplay | ( | void | ) |
| int sceSblQafMgrIsAllowForceUpdate | ( | void | ) |
| int sceSblQafMgrIsAllowLimitedDebugMenuDisplay | ( | void | ) |
| int sceSblQafMgrIsAllowMinimumDebugMenuDisplay | ( | void | ) |
| int sceSblQafMgrIsAllowNonQAPup | ( | void | ) |
| int sceSblQafMgrIsAllowNpFullTest | ( | void | ) |
| int sceSblQafMgrIsAllowNpTest | ( | void | ) |
Check whether NP test mode is enabled.
| int sceSblQafMgrIsAllowRemoteSysmoduleLoad | ( | void | ) |
| int sceSblQafMgrIsAllowScreenShotAlways | ( | void | ) |
| int sceSblQafMgrSetQafToken2 | ( | const SceQafTokenEx * | qaf_token | ) |
Validate and install an extended QAF token.
The calling process must be a system program. qaf_sm command 12 validates the 0x180-byte token. The secure version counter is then initialized or advanced from byte 5. The token is enabled before it is written to NVS and read back for verification.
| [in] | qaf_token | - Required encrypted token and signature. |
| char SceQafTokenEnc::magic[4] |
Token magic.
| SceUInt32 SceQafTokenEnc::qaf_version |
QAF token version; FW 3.60 uses its second byte as the version counter.
| char SceQafTokenEnc::qaf_name[0x18] |
NUL-terminated or padded QAF profile name.
| SceUInt8 SceQafTokenEnc::enc_data[0x60] |
Encrypted token payload.
| SceUInt8 SceQafTokenEx::token_data[0x80] |
Input to sceSblQafMgrSetQafToken2 has the layout of SceQafTokenEnc.
sceSblQafMgrGetQafToken2 transforms this region, but its output layout is not established. Encrypted token on input to sceSblQafMgrSetQafToken2.
| SceUInt8 SceQafTokenEx::sig[0x100] |
0x100-byte token signature.