CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
hrydgard

CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!

GitHub Repository: hrydgard/ppsspp
Path: blob/master/Tools/SaveTool/decrypt.h
Views: 1401
1
/*
2
* PSP Software Development Kit - http://www.pspdev.org
3
* -----------------------------------------------------------------------
4
* Licensed under the BSD license, see LICENSE in PSPSDK root for details.
5
*
6
* decrypt.h - Declarations for functions in decrypt.c
7
*
8
* Copyright (c) 2005 Jim Paris <[email protected]>
9
* Coypright (c) 2005 psp123
10
*
11
* $Id: decrypt.h 1562 2005-12-10 20:52:45Z jim $
12
*/
13
14
#include <pspchnnlsv.h>
15
16
/* Detect the samegame format and decrypt it. See main.c for an example. */
17
int decrypt_file(const char *decrypted_filename,
18
const char *encrypted_filename,
19
const unsigned char *gamekey,
20
const int mainSdkVersion);
21
22
/* Do the actual hardware decryption.
23
mode is 3 for saves with a cryptkey, or 1 otherwise.
24
data, alignedLen, and cryptkey must be multiples of 0x10.
25
cryptkey is NULL if mode == 1.
26
*/
27
int decrypt_data(unsigned int mode,
28
unsigned char *data,
29
int *dataLen,
30
int *alignedLen,
31
unsigned char *cryptkey);
32
33