![]() |
vitasdk
Documentation of the vitasdk
|
Exports for User. More...
Data Structures | |
| struct | SceNpDrmPackageCheckOpt |
| struct | _sceNpDrmPackageDecrypt_opt |
| Options for _sceNpDrmPackageDecrypt. More... | |
| struct | SceNpDrmPackageStartedOpt |
| struct | SceNpDrmPackageFinishedOpt |
Functions | |
| VITASDK_BUILD_ASSERT_EQ (0x20, SceNpDrmPackageCheckOpt) | |
| VITASDK_BUILD_ASSERT_EQ (0x10, SceNpDrmPackageDecryptOpt) | |
| VITASDK_BUILD_ASSERT_EQ (0x10, SceNpDrmPackageStartedOpt) | |
| VITASDK_BUILD_ASSERT_EQ (0x8, SceNpDrmPackageFinishedOpt) | |
| int | _sceNpDrmPackageCheck (const void *buffer, SceSize size, int opt, unsigned int identifier) |
| Read the header of the PKG and initialize the context. | |
| int | _sceNpDrmPackageDecrypt (void *__restrict__ buffer, SceSize size, SceNpDrmPackageDecryptOpt *__restrict__ opt) |
| Decrypt a PKG. | |
| int | _sceNpDrmPackageTransform (const void *buffer, SceSize size, SceSblDmac5HashTransformContext *context, SceUInt32 identifier) |
| Update a package hash-transform context. | |
| int | _sceNpDrmPackageInstallStarted (int identifier, int forwarded_value, const void *message, const SceNpDrmPackageStartedOpt *opt) |
| Notify that package installation has started. | |
| int | _sceNpDrmPackageInstallFinished (int result_code, const void *message, SceSize message_size, const SceNpDrmPackageFinishedOpt *opt) |
| Notify that package installation has finished. | |
| int | _sceNpDrmPackageUninstallStarted (int identifier, int forwarded_value, const void *message, const SceNpDrmPackageStartedOpt *opt) |
| Notify that package uninstallation has started. | |
| int | _sceNpDrmPackageUninstallFinished (int result_code, const void *message, SceSize message_size, const SceNpDrmPackageFinishedOpt *opt) |
| Notify that package uninstallation has finished. | |
| int | _sceNpDrmSaveDataFormatStarted (int identifier, int forwarded_value, const void *message, const SceNpDrmPackageStartedOpt *opt) |
| Notify that save-data formatting has started. | |
| int | _sceNpDrmSaveDataFormatFinished (int result_code, const void *message, SceSize message_size, const SceNpDrmPackageFinishedOpt *opt) |
| Notify that save-data formatting has finished. | |
| int | _sceNpDrmSaveDataInstallStarted (int identifier, int forwarded_value, const void *message, const SceNpDrmPackageStartedOpt *opt) |
| Notify that save-data installation has started. | |
| int | _sceNpDrmSaveDataInstallFinished (int result_code, const void *message, SceSize message_size, const SceNpDrmPackageFinishedOpt *opt) |
| Notify that save-data installation has finished. | |
| int | sceNpDrmPackageInstallOngoing (int identifier, SceUInt32 progress) |
| Report package installation progress. | |
| SceBool | sceNpDrmPackageIsGameExist (void) |
| int | sceNpDrmPackageUninstallOngoing (int identifier, SceUInt32 progress) |
| Report package uninstallation progress. | |
| int | sceNpDrmSaveDataFormatOngoing (int identifier, SceUInt32 progress) |
| Report save-data formatting progress. | |
| int | sceNpDrmSaveDataInstallOngoing (int identifier, SceUInt32 progress) |
| Report save-data installation progress. | |
Variables | |
| SceUInt32 | SceNpDrmPackageCheckOpt::reserved [8] |
| Ignored on FW 3.60. | |
| SceOff | _sceNpDrmPackageDecrypt_opt::offset |
| Offset in the encrypted data. | |
| SceUInt32 | _sceNpDrmPackageDecrypt_opt::identifier |
| Context identifier passed to _sceNpDrmPackageCheck without the 0x100 flag. | |
| SceSize | SceNpDrmPackageStartedOpt::message_size |
| Size of the message buffer. | |
| SceSize | SceNpDrmPackageStartedOpt::message_copy_size |
| Number of bytes to copy from the message buffer; must not exceed 0x40. | |
| SceUInt32 | SceNpDrmPackageStartedOpt::reserved [2] |
| Ignored on FW 3.60. | |
| SceSize | SceNpDrmPackageFinishedOpt::message_copy_size |
| Number of bytes to copy from the message buffer; must not exceed 0x40. | |
| SceUInt32 | SceNpDrmPackageFinishedOpt::reserved |
| Ignored on FW 3.60. | |
Exports for User.
Include the header file in your project:
Link the library to the executable:
On FW 3.60, every function in this library except sceNpDrmPackageIsGameExist is restricted to system programs with auth ID 0x2800000000000001, 0x280000000000002D, 0x280000000000002E, or 0x2800000000000039.
The started and finished notification functions copy at most 0x40 bytes from the message buffer before returning. You may reuse or free the buffer after the function returns.
| struct SceNpDrmPackageCheckOpt |
| Data Fields | ||
|---|---|---|
| SceUInt32 | reserved[8] | Ignored on FW 3.60. |
| struct _sceNpDrmPackageDecrypt_opt |
Options for _sceNpDrmPackageDecrypt.
The older type name _sceNpDrmPackageDecrypt_opt is kept for backwards compatibility.
| Data Fields | ||
|---|---|---|
| SceOff | offset | Offset in the encrypted data. |
| SceUInt32 | identifier | Context identifier passed to _sceNpDrmPackageCheck without the 0x100 flag. |
| struct SceNpDrmPackageStartedOpt |
| struct SceNpDrmPackageFinishedOpt |
| VITASDK_BUILD_ASSERT_EQ | ( | 0x20 | , |
| SceNpDrmPackageCheckOpt | |||
| ) |
| VITASDK_BUILD_ASSERT_EQ | ( | 0x10 | , |
| SceNpDrmPackageDecryptOpt | |||
| ) |
| VITASDK_BUILD_ASSERT_EQ | ( | 0x10 | , |
| SceNpDrmPackageStartedOpt | |||
| ) |
| VITASDK_BUILD_ASSERT_EQ | ( | 0x8 | , |
| SceNpDrmPackageFinishedOpt | |||
| ) |
| int _sceNpDrmPackageCheck | ( | const void * | buffer, |
| SceSize | size, | ||
| int | opt, | ||
| unsigned int | identifier | ||
| ) |
Read the header of the PKG and initialize the context.
The caller must be one of the system programs accepted by FW 3.60.
| [in] | buffer | - Buffer containing the PKG header |
| [in] | size | - Buffer size. A normal check requires at least 0x8000 bytes. |
| [in] | opt | - A 32-bit user pointer to a SceNpDrmPackageCheckOpt structure, or 0. The parameter remains an integer for backwards compatibility. The structure contents are ignored on FW 3.60. Any nonzero pointer requests that the context be destroyed. |
| [in] | identifier | - Value whose low byte selects one of six contexts. Bit 0x100 creates or uses the context. Bit 0x200 also requests that the context be destroyed and requires a nonzero opt. |
| int _sceNpDrmPackageDecrypt | ( | void *__restrict__ | buffer, |
| SceSize | size, | ||
| SceNpDrmPackageDecryptOpt *__restrict__ | opt | ||
| ) |
Decrypt a PKG.
The caller must be one of the system programs accepted by FW 3.60.
| [in,out] | buffer | - PKG data to decrypt in place |
| [in] | size | - Size of the buffer |
| [in] | opt | - Required input-only offset and context identifier. Still declared as non-const for backwards compatibility. |
| int _sceNpDrmPackageTransform | ( | const void * | buffer, |
| SceSize | size, | ||
| SceSblDmac5HashTransformContext * | context, | ||
| SceUInt32 | identifier | ||
| ) |
Update a package hash-transform context.
The caller must be one of the system programs accepted by FW 3.60.
| [in] | buffer | - Input data |
| [in] | size | - Size of the input data; must be nonzero |
| [in,out] | context | - Required hash context. All 0x28 bytes are copied in before the update and copied back afterwards. |
| [in] | identifier | - Package identifier and flags. Bit 0x10000 copies the 0x20-byte DMAC5 hash output into context->state. Bit 0x40000000 selects DMAC5 command 3 instead of command 0x13. |
| int _sceNpDrmPackageInstallStarted | ( | int | identifier, |
| int | forwarded_value, | ||
| const void * | message, | ||
| const SceNpDrmPackageStartedOpt * | opt | ||
| ) |
Notify that package installation has started.
| [in] | identifier | - Package operation identifier. The FW 3.60 installer sets bit 0x80000000 for a started notification. |
| [in] | forwarded_value | - Passed unchanged to the system callback; its purpose is unknown. Observed FW 3.60 callers pass 0. |
| [in] | message | - Optional status data |
| [in] | opt | - Required message-size options |
| int _sceNpDrmPackageInstallFinished | ( | int | result_code, |
| const void * | message, | ||
| SceSize | message_size, | ||
| const SceNpDrmPackageFinishedOpt * | opt | ||
| ) |
Notify that package installation has finished.
| [in] | result_code | - Operation result |
| [in] | message | - Optional status data |
| [in] | message_size | - Size of the status data |
| [in] | opt | - Required message-copy options |
| int _sceNpDrmPackageUninstallStarted | ( | int | identifier, |
| int | forwarded_value, | ||
| const void * | message, | ||
| const SceNpDrmPackageStartedOpt * | opt | ||
| ) |
Notify that package uninstallation has started.
| [in] | identifier | - Package operation identifier. The FW 3.60 installer sets bit 0x80000000 for a started notification. |
| [in] | forwarded_value | - Passed unchanged to the system callback; its purpose is unknown. Observed FW 3.60 callers pass 0. |
| [in] | message | - Optional status data |
| [in] | opt | - Required message-size options |
| int _sceNpDrmPackageUninstallFinished | ( | int | result_code, |
| const void * | message, | ||
| SceSize | message_size, | ||
| const SceNpDrmPackageFinishedOpt * | opt | ||
| ) |
Notify that package uninstallation has finished.
| [in] | result_code | - Operation result |
| [in] | message | - Optional status data |
| [in] | message_size | - Size of the status data |
| [in] | opt | - Required message-copy options |
| int _sceNpDrmSaveDataFormatStarted | ( | int | identifier, |
| int | forwarded_value, | ||
| const void * | message, | ||
| const SceNpDrmPackageStartedOpt * | opt | ||
| ) |
Notify that save-data formatting has started.
| [in] | identifier | - Save-data operation identifier. The FW 3.60 installer sets bit 0x80000000 for a started notification. |
| [in] | forwarded_value | - Passed unchanged to the system callback; its purpose is unknown. Observed FW 3.60 callers pass 0. |
| [in] | message | - Optional status data |
| [in] | opt | - Required message-size options |
| int _sceNpDrmSaveDataFormatFinished | ( | int | result_code, |
| const void * | message, | ||
| SceSize | message_size, | ||
| const SceNpDrmPackageFinishedOpt * | opt | ||
| ) |
Notify that save-data formatting has finished.
| [in] | result_code | - Operation result |
| [in] | message | - Optional status data |
| [in] | message_size | - Size of the status data |
| [in] | opt | - Required message-copy options |
| int _sceNpDrmSaveDataInstallStarted | ( | int | identifier, |
| int | forwarded_value, | ||
| const void * | message, | ||
| const SceNpDrmPackageStartedOpt * | opt | ||
| ) |
Notify that save-data installation has started.
| [in] | identifier | - Save-data operation identifier. The FW 3.60 installer sets bit 0x80000000 for a started notification. |
| [in] | forwarded_value | - Passed unchanged to the system callback; its purpose is unknown. Observed FW 3.60 callers pass 0. |
| [in] | message | - Optional status data |
| [in] | opt | - Required message-size options |
| int _sceNpDrmSaveDataInstallFinished | ( | int | result_code, |
| const void * | message, | ||
| SceSize | message_size, | ||
| const SceNpDrmPackageFinishedOpt * | opt | ||
| ) |
Notify that save-data installation has finished.
| [in] | result_code | - Operation result |
| [in] | message | - Optional status data |
| [in] | message_size | - Size of the status data |
| [in] | opt | - Required message-copy options |
| int sceNpDrmPackageInstallOngoing | ( | int | identifier, |
| SceUInt32 | progress | ||
| ) |
Report package installation progress.
| [in] | identifier | - Package operation identifier |
| [in] | progress | - Progress percentage. FW 3.60 does not validate this value; the FW 3.60 installer uses values from 0 through 100. |
| SceBool sceNpDrmPackageIsGameExist | ( | void | ) |
| int sceNpDrmPackageUninstallOngoing | ( | int | identifier, |
| SceUInt32 | progress | ||
| ) |
Report package uninstallation progress.
| [in] | identifier | - Package operation identifier |
| [in] | progress | - Progress percentage. FW 3.60 does not validate this value; the FW 3.60 installer uses values from 0 through 100. |
| int sceNpDrmSaveDataFormatOngoing | ( | int | identifier, |
| SceUInt32 | progress | ||
| ) |
Report save-data formatting progress.
| [in] | identifier | - Save-data operation identifier |
| [in] | progress | - Progress percentage. FW 3.60 does not validate this value; the FW 3.60 installer uses values from 0 through 100. |
| int sceNpDrmSaveDataInstallOngoing | ( | int | identifier, |
| SceUInt32 | progress | ||
| ) |
Report save-data installation progress.
| [in] | identifier | - Save-data operation identifier |
| [in] | progress | - Progress percentage. FW 3.60 does not validate this value; the FW 3.60 installer uses values from 0 through 100. |
| SceUInt32 SceNpDrmPackageCheckOpt::reserved[8] |
Ignored on FW 3.60.
| SceOff _sceNpDrmPackageDecrypt_opt::offset |
Offset in the encrypted data.
| SceUInt32 _sceNpDrmPackageDecrypt_opt::identifier |
Context identifier passed to _sceNpDrmPackageCheck without the 0x100 flag.
| SceSize SceNpDrmPackageStartedOpt::message_size |
Size of the message buffer.
| SceSize SceNpDrmPackageStartedOpt::message_copy_size |
Number of bytes to copy from the message buffer; must not exceed 0x40.
| SceUInt32 SceNpDrmPackageStartedOpt::reserved[2] |
Ignored on FW 3.60.
| SceSize SceNpDrmPackageFinishedOpt::message_copy_size |
Number of bytes to copy from the message buffer; must not exceed 0x40.
| SceUInt32 SceNpDrmPackageFinishedOpt::reserved |
Ignored on FW 3.60.