|
static CC_DEPRECATED_ATTRIBUTE
ssize_t | ccInflateMemory (unsigned char *in, ssize_t inLength, unsigned char **out) |
| Inflates either zlib or gzip deflated memory. More...
|
|
static ssize_t | inflateMemory (unsigned char *in, ssize_t inLength, unsigned char **out) |
static CC_DEPRECATED_ATTRIBUTE
ssize_t | ccInflateMemoryWithHint (unsigned char *in, ssize_t inLength, unsigned char **out, ssize_t outLengthHint) |
| Inflates either zlib or gzip deflated memory. More...
|
|
static ssize_t | inflateMemoryWithHint (unsigned char *in, ssize_t inLength, unsigned char **out, ssize_t outLengthHint) |
static CC_DEPRECATED_ATTRIBUTE int | ccInflateGZipFile (const char *filename, unsigned char **out) |
| inflates a GZip file into memory More...
|
|
static int | inflateGZipFile (const char *filename, unsigned char **out) |
static CC_DEPRECATED_ATTRIBUTE bool | ccIsGZipFile (const char *filename) |
| test a file is a GZip format file or not More...
|
|
static bool | isGZipFile (const char *filename) |
static CC_DEPRECATED_ATTRIBUTE bool | ccIsGZipBuffer (const unsigned char *buffer, ssize_t len) |
| test the buffer is GZip format or not More...
|
|
static bool | isGZipBuffer (const unsigned char *buffer, ssize_t len) |
static CC_DEPRECATED_ATTRIBUTE int | ccInflateCCZFile (const char *filename, unsigned char **out) |
| inflates a CCZ file into memory More...
|
|
static int | inflateCCZFile (const char *filename, unsigned char **out) |
static CC_DEPRECATED_ATTRIBUTE int | ccInflateCCZBuffer (const unsigned char *buffer, ssize_t len, unsigned char **out) |
| inflates a buffer with CCZ format into memory More...
|
|
static int | inflateCCZBuffer (const unsigned char *buffer, ssize_t len, unsigned char **out) |
static CC_DEPRECATED_ATTRIBUTE bool | ccIsCCZFile (const char *filename) |
| test a file is a CCZ format file or not More...
|
|
static bool | isCCZFile (const char *filename) |
static CC_DEPRECATED_ATTRIBUTE bool | ccIsCCZBuffer (const unsigned char *buffer, ssize_t len) |
| test the buffer is CCZ format or not More...
|
|
static bool | isCCZBuffer (const unsigned char *buffer, ssize_t len) |
static CC_DEPRECATED_ATTRIBUTE void | ccSetPvrEncryptionKeyPart (int index, unsigned int value) |
| Sets the pvr.ccz encryption key parts separately for added security. More...
|
|
static void | setPvrEncryptionKeyPart (int index, unsigned int value) |
static CC_DEPRECATED_ATTRIBUTE void | ccSetPvrEncryptionKey (unsigned int keyPart1, unsigned int keyPart2, unsigned int keyPart3, unsigned int keyPart4) |
| Sets the pvr.ccz encryption key. More...
|
|
static void | setPvrEncryptionKey (unsigned int keyPart1, unsigned int keyPart2, unsigned int keyPart3, unsigned int keyPart4) |
static CC_DEPRECATED_ATTRIBUTE
void ccSetPvrEncryptionKey |
( |
unsigned int |
keyPart1, |
|
|
unsigned int |
keyPart2, |
|
|
unsigned int |
keyPart3, |
|
|
unsigned int |
keyPart4 |
|
) |
| |
|
inlinestatic |
Sets the pvr.ccz encryption key.
Example: If the key used to encrypt the pvr.ccz file is 0xaaaaaaaabbbbbbbbccccccccdddddddd you will call this function with the key split into 4 parts as follows
ZipUtils::setPvrEncryptionKey(0xaaaaaaaa, 0xbbbbbbbb, 0xcccccccc, 0xdddddddd);
Note that using this function makes it easier to reverse engineer and discover the complete key because the key parts are present in one function call.
IMPORTANT: Be sure to call setPvrEncryptionKey or setPvrEncryptionKeyPart with all of the key parts before loading the spritesheet or decryption will fail and the spritesheet will fail to load.
- Parameters
-
keyPart1 | the key value part 1. |
keyPart2 | the key value part 2. |
keyPart3 | the key value part 3. |
keyPart4 | the key value part 4. |
Sets the pvr.ccz encryption key parts separately for added security.
Example: If the key used to encrypt the pvr.ccz file is 0xaaaaaaaabbbbbbbbccccccccdddddddd you will call this function 4 different times, preferably from 4 different source files, as follows
ZipUtils::setPvrEncryptionKeyPart(0, 0xaaaaaaaa); ZipUtils::setPvrEncryptionKeyPart(1, 0xbbbbbbbb); ZipUtils::setPvrEncryptionKeyPart(2, 0xcccccccc); ZipUtils::setPvrEncryptionKeyPart(3, 0xdddddddd);
Splitting the key into 4 parts and calling the function from 4 different source files increases the difficulty to reverse engineer the encryption key. Be aware that encrpytion is never 100% secure and the key code can be cracked by knowledgable persons.
IMPORTANT: Be sure to call setPvrEncryptionKey or setPvrEncryptionKeyPart with all of the key parts before loading the spritesheet or decryption will fail and the spritesheet will fail to load.
- Parameters
-
index | part of the key [0..3] |
value | value of the key part |