vitasdk
Documentation of the vitasdk

Detailed Description

Exports for Kernel.


Using this library in your project

Include the header file in your project:


Link the library to the executable:

SceKernelUtilsForDriver_stub



Functions

 VITASDK_BUILD_ASSERT_EQ (0x78, SceSha1Context)
 
 VITASDK_BUILD_ASSERT_EQ (0x90, SceSha224Context)
 
 VITASDK_BUILD_ASSERT_EQ (0x90, SceSha256Context)
 
 VITASDK_BUILD_ASSERT_EQ (0x10, SceDeflatePartialInputParam)
 
 VITASDK_BUILD_ASSERT_EQ (0x3D0, SceAesContext)
 
int ksceSha1BlockInit (SceSha1Context *ctx)
 
int ksceSha1BlockUpdate (SceSha1Context *ctx, const void *plain, SceSize len)
 
int ksceSha1BlockResult (SceSha1Context *ctx, void *result)
 
int ksceSha1Digest (const void *plain, SceSize len, void *digest)
 
int ksceSha224BlockInit (SceSha224Context *ctx)
 
int ksceSha224BlockUpdate (SceSha224Context *ctx, const void *plain, SceSize len)
 
int ksceSha224BlockResult (SceSha224Context *ctx, void *result)
 
int ksceSha224Digest (const void *plain, SceSize len, void *digest)
 
int ksceSha256BlockInit (SceSha256Context *ctx)
 
int ksceSha256BlockUpdate (SceSha256Context *ctx, const void *plain, SceSize len)
 
int ksceSha256BlockResult (SceSha256Context *ctx, void *result)
 
int ksceSha256Digest (const void *plain, SceSize len, void *digest)
 
int ksceHmacSha1Digest (const void *key, SceSize key_len, const void *plain, SceSize len, void *digest)
 
int ksceHmacSha224Digest (const void *key, SceSize key_len, const void *plain, SceSize len, void *digest)
 
int ksceHmacSha256Digest (const void *key, SceSize key_len, const void *plain, SceSize len, void *digest)
 
int ksceGzipDecompress (void *dst, SceSize dst_size, const void *src, uint32_t *crc32)
 
int ksceGzipIsValid (const void *src)
 Check magic of Gzip header. More...
 
int ksceGzipGetInfo (const void *src, const void **extra, const char **name, const char **comment, unsigned short *crc, const void **data)
 Get filename etc. More...
 
const char * ksceGzipGetName (const void *src)
 Get filename string address. More...
 
const char * ksceGzipGetComment (const void *src)
 Get comment string address. More...
 
const void * ksceGzipGetCompressedData (const void *src)
 Get compressed data start address. More...
 
int ksceZlibGetInfo (const void *src, unsigned char *cmf, unsigned char *flg, unsigned int *dictid, const void **data)
 Get filename etc. More...
 
const void * ksceZlibGetCompressedData (const void *src)
 Get compressed data start address. More...
 
int ksceZlibDecompress (void *dst, SceSize dst_size, const void *src, uint32_t *adler32)
 
int ksceDeflateDecompress (void *dst, SceSize dst_size, const void *src, const void **next)
 
int ksceDeflateDecompressPartial (void *dst, SceSize dst_size, const void *src, const void **next, SceDeflatePartialInputParam *cbInfo)
 
int ksceAesInit1 (SceAesContext *ctx, SceSize blocksize, SceSize keysize, const void *key)
 
int ksceAesInit2 (SceAesContext *ctx, SceSize blocksize, SceSize keysize, const void *key)
 
int ksceAesInit3 (SceAesContext *ctx, SceSize blocksize, SceSize keysize, const void *key)
 
int ksceAesDecrypt1 (SceAesContext *ctx, const void *src, void *dst)
 
int ksceAesDecrypt2 (SceAesContext *ctx, const void *src, void *dst)
 
int ksceAesEncrypt1 (SceAesContext *ctx, const void *src, void *dst)
 
int ksceAesEncrypt2 (SceAesContext *ctx, const void *src, void *dst)
 

Macros

#define SCE_SHA1_BLOCK_SIZE   64
 
#define SCE_SHA1_DIGEST_SIZE   20
 
#define SCE_SHA224_BLOCK_SIZE   64
 
#define SCE_SHA224_DIGEST_SIZE   28
 
#define SCE_SHA256_BLOCK_SIZE   64
 
#define SCE_SHA256_DIGEST_SIZE   32
 

Data Structure Documentation

◆ SceSha1Context

struct SceSha1Context
Data Fields
uint32_t h[5]
uint16_t usRemains
uint16_t usComputed
uint64_t ullTotalLen
char buf[SCE_SHA1_BLOCK_SIZE]
char result[SCE_SHA1_DIGEST_SIZE]
uint32_t pad

◆ SceSha224Context

struct SceSha224Context
Data Fields
uint32_t h[8]
uint32_t pad
uint16_t usRemains
uint16_t usComputed
uint64_t ullTotalLen
char buf[SCE_SHA224_BLOCK_SIZE]
char result[SCE_SHA224_DIGEST_SIZE]
uint32_t pad2

◆ SceSha256Context

struct SceSha256Context
Data Fields
uint32_t h[8]
uint32_t pad
uint16_t usRemains
uint16_t usComputed
uint64_t ullTotalLen
char buf[SCE_SHA256_BLOCK_SIZE]
char result[SCE_SHA256_DIGEST_SIZE]

◆ SceDeflatePartialInputParam

struct SceDeflatePartialInputParam

Data Fields

uint32_t size
 
const void * pBufEnd
 
void * cookie
 
const void *(* SceDeflateDecompressPartialInputCallback )(struct SceDeflatePartialInputParam *param, uint32_t outputsize)
 

◆ SceAesContext

struct SceAesContext
Data Fields
uint8_t data[976]

Macro Definition Documentation

◆ SCE_SHA1_BLOCK_SIZE

#define SCE_SHA1_BLOCK_SIZE   64

◆ SCE_SHA1_DIGEST_SIZE

#define SCE_SHA1_DIGEST_SIZE   20

◆ SCE_SHA224_BLOCK_SIZE

#define SCE_SHA224_BLOCK_SIZE   64

◆ SCE_SHA224_DIGEST_SIZE

#define SCE_SHA224_DIGEST_SIZE   28

◆ SCE_SHA256_BLOCK_SIZE

#define SCE_SHA256_BLOCK_SIZE   64

◆ SCE_SHA256_DIGEST_SIZE

#define SCE_SHA256_DIGEST_SIZE   32

Function Documentation

◆ VITASDK_BUILD_ASSERT_EQ() [1/5]

VITASDK_BUILD_ASSERT_EQ ( 0x78  ,
SceSha1Context   
)

◆ VITASDK_BUILD_ASSERT_EQ() [2/5]

VITASDK_BUILD_ASSERT_EQ ( 0x90  ,
SceSha224Context   
)

◆ VITASDK_BUILD_ASSERT_EQ() [3/5]

VITASDK_BUILD_ASSERT_EQ ( 0x90  ,
SceSha256Context   
)

◆ VITASDK_BUILD_ASSERT_EQ() [4/5]

VITASDK_BUILD_ASSERT_EQ ( 0x10  ,
SceDeflatePartialInputParam   
)

◆ VITASDK_BUILD_ASSERT_EQ() [5/5]

VITASDK_BUILD_ASSERT_EQ ( 0x3D0  ,
SceAesContext   
)

◆ ksceSha1BlockInit()

int ksceSha1BlockInit ( SceSha1Context ctx)

◆ ksceSha1BlockUpdate()

int ksceSha1BlockUpdate ( SceSha1Context ctx,
const void *  plain,
SceSize  len 
)

◆ ksceSha1BlockResult()

int ksceSha1BlockResult ( SceSha1Context ctx,
void *  result 
)

◆ ksceSha1Digest()

int ksceSha1Digest ( const void *  plain,
SceSize  len,
void *  digest 
)

◆ ksceSha224BlockInit()

int ksceSha224BlockInit ( SceSha224Context ctx)

◆ ksceSha224BlockUpdate()

int ksceSha224BlockUpdate ( SceSha224Context ctx,
const void *  plain,
SceSize  len 
)

◆ ksceSha224BlockResult()

int ksceSha224BlockResult ( SceSha224Context ctx,
void *  result 
)

◆ ksceSha224Digest()

int ksceSha224Digest ( const void *  plain,
SceSize  len,
void *  digest 
)

◆ ksceSha256BlockInit()

int ksceSha256BlockInit ( SceSha256Context ctx)

◆ ksceSha256BlockUpdate()

int ksceSha256BlockUpdate ( SceSha256Context ctx,
const void *  plain,
SceSize  len 
)

◆ ksceSha256BlockResult()

int ksceSha256BlockResult ( SceSha256Context ctx,
void *  result 
)

◆ ksceSha256Digest()

int ksceSha256Digest ( const void *  plain,
SceSize  len,
void *  digest 
)

◆ ksceHmacSha1Digest()

int ksceHmacSha1Digest ( const void *  key,
SceSize  key_len,
const void *  plain,
SceSize  len,
void *  digest 
)

◆ ksceHmacSha224Digest()

int ksceHmacSha224Digest ( const void *  key,
SceSize  key_len,
const void *  plain,
SceSize  len,
void *  digest 
)

◆ ksceHmacSha256Digest()

int ksceHmacSha256Digest ( const void *  key,
SceSize  key_len,
const void *  plain,
SceSize  len,
void *  digest 
)

◆ ksceGzipDecompress()

int ksceGzipDecompress ( void *  dst,
SceSize  dst_size,
const void *  src,
uint32_t *  crc32 
)
Parameters
[out]dst- dst buf
[in]dst_size- dst buf size
[in]src- Gzip compressed data
[out]crc32- crc32 when decompressed
Returns
decompressed size on success, < 0 on error.

◆ ksceGzipIsValid()

int ksceGzipIsValid ( const void *  src)

Check magic of Gzip header.

Parameters
[in]src- Gzip compressed data
Returns
1 on success, 0 is not Gzip data.

◆ ksceGzipGetInfo()

int ksceGzipGetInfo ( const void *  src,
const void **  extra,
const char **  name,
const char **  comment,
unsigned short *  crc,
const void **  data 
)

Get filename etc.

in Gzip data

Parameters
[in]src- Gzip compressed data
[out]extra- Get information on extra-field
[out]name- Get filename information
[out]comment- Get comment information
[out]crc- Get CRC16 information
[out]data- Get compressed data start address
Returns
0 on success, < 0 on error.

◆ ksceGzipGetName()

const char* ksceGzipGetName ( const void *  src)

Get filename string address.

Parameters
[in]src- Gzip compressed data
Returns
string address on success, NULL on error.

◆ ksceGzipGetComment()

const char* ksceGzipGetComment ( const void *  src)

Get comment string address.

Parameters
[in]src- Gzip compressed data
Returns
string address on success, NULL on error.

◆ ksceGzipGetCompressedData()

const void* ksceGzipGetCompressedData ( const void *  src)

Get compressed data start address.

Parameters
[in]src- Gzip compressed data
Returns
compressed data address on success, NULL on error.

◆ ksceZlibGetInfo()

int ksceZlibGetInfo ( const void *  src,
unsigned char *  cmf,
unsigned char *  flg,
unsigned int *  dictid,
const void **  data 
)

Get filename etc.

in Zlib data

Parameters
[in]src- Zlib compressed data
[out]cmf- Get CMF (Compression Method and flags)
[out]flg- Get FLG (FLaGs)
[out]dictid- Get DictId
[out]data- Get compressed data start address
Returns
0 on success, < 0 on error.

◆ ksceZlibGetCompressedData()

const void* ksceZlibGetCompressedData ( const void *  src)

Get compressed data start address.

Parameters
[in]src- Gzip compressed data
Returns
compressed data address on success, NULL on error.

◆ ksceZlibDecompress()

int ksceZlibDecompress ( void *  dst,
SceSize  dst_size,
const void *  src,
uint32_t *  adler32 
)
Parameters
[out]dst- dst buf
[in]dst_size- dst buf size
[in]src- Zlib compressed data
[out]adler32- adler32 when decompressed
Returns
decompressed size on success, < 0 on error.

◆ ksceDeflateDecompress()

int ksceDeflateDecompress ( void *  dst,
SceSize  dst_size,
const void *  src,
const void **  next 
)
Parameters
[out]dst- dst buf
[in]dst_size- dst buf size
[in]src- Deflate compressed data
[out]next- next data
Returns
decompressed size on success, < 0 on error.

◆ ksceDeflateDecompressPartial()

int ksceDeflateDecompressPartial ( void *  dst,
SceSize  dst_size,
const void *  src,
const void **  next,
SceDeflatePartialInputParam cbInfo 
)

◆ ksceAesInit1()

int ksceAesInit1 ( SceAesContext ctx,
SceSize  blocksize,
SceSize  keysize,
const void *  key 
)
Parameters
[out]ctx- out key data, etc...
[in]blocksize- 128 or 192 or 256
[in]keysize- 128 or 192 or 256
[in]key- key data
Returns
0 on success, < 0 on error.

◆ ksceAesInit2()

int ksceAesInit2 ( SceAesContext ctx,
SceSize  blocksize,
SceSize  keysize,
const void *  key 
)

◆ ksceAesInit3()

int ksceAesInit3 ( SceAesContext ctx,
SceSize  blocksize,
SceSize  keysize,
const void *  key 
)

◆ ksceAesDecrypt1()

int ksceAesDecrypt1 ( SceAesContext ctx,
const void *  src,
void *  dst 
)

◆ ksceAesDecrypt2()

int ksceAesDecrypt2 ( SceAesContext ctx,
const void *  src,
void *  dst 
)

◆ ksceAesEncrypt1()

int ksceAesEncrypt1 ( SceAesContext ctx,
const void *  src,
void *  dst 
)

◆ ksceAesEncrypt2()

int ksceAesEncrypt2 ( SceAesContext ctx,
const void *  src,
void *  dst 
)