vitasdk
Documentation of the vitasdk

Detailed Description

Exports for User.


Using this library in your project

Include the header file in your project:


Link the library to the executable:

SceNpDrmPackage_stub



Functions

 VITASDK_BUILD_ASSERT_EQ (0x10, _sceNpDrmPackageDecrypt_opt)
 
int _sceNpDrmPackageCheck (const void *buffer, SceSize size, int zero, unsigned int identifier)
 Read the header of the PKG and initialize the context. More...
 
int _sceNpDrmPackageDecrypt (void *__restrict__ buffer, SceSize size, _sceNpDrmPackageDecrypt_opt *__restrict__ opt)
 Decrypt a PKG. More...
 

Data Structure Documentation

◆ _sceNpDrmPackageDecrypt_opt

struct _sceNpDrmPackageDecrypt_opt

Options for _sceNpDrmPackageDecrypt.

Data Fields
SceOff offset The offset in the encrypted data.
unsigned int identifier The identifier specified for _sceNpDrmPackageCheck but NOT ORed with (1 << 8)

Function Documentation

◆ VITASDK_BUILD_ASSERT_EQ()

VITASDK_BUILD_ASSERT_EQ ( 0x10  ,
_sceNpDrmPackageDecrypt_opt   
)

◆ _sceNpDrmPackageCheck()

int _sceNpDrmPackageCheck ( const void *  buffer,
SceSize  size,
int  zero,
unsigned int  identifier 
)

Read the header of the PKG and initialize the context.

Parameters
buffer- The buffer containing the header of PKG.
size- The size of buffer. The minimum confirmed value is 0x8000.
zero- Unknown. Supposed to be set to 0.
identifier- arbitrary value [0, 6) ORed with (1 << 8) or 0. If it is set to 0, the function just checks the header and doesn't create the context.
Returns
0 on success, != 0 on error

◆ _sceNpDrmPackageDecrypt()

int _sceNpDrmPackageDecrypt ( void *__restrict__  buffer,
SceSize  size,
_sceNpDrmPackageDecrypt_opt *__restrict__  opt 
)

Decrypt a PKG.

Parameters
buffer- The buffer containing the content of the PKG.
size- The size of the buffer. The minimum confirmed value is 0x20.
opt- The options.
Returns
0 on success, != 0 on error