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/hash.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
* hash.h - Declarations for functions in hash.c
7
*
8
* Copyright (c) 2005 Jim Paris <[email protected]>
9
* Coypright (c) 2005 psp123
10
*
11
* $Id: hash.h 1559 2005-12-10 01:10:11Z jim $
12
*/
13
14
#include <pspchnnlsv.h>
15
16
/* Update the hashes in the param.sfo data, using
17
the given file hash, and by computing the param.sfo hashes.
18
filehash must be a multiple of 16 bytes, and is reused to
19
store other hashes. The filename is e.g. "DATA.BIN". */
20
int update_hashes(unsigned char *data,
21
int len,
22
const char *filename,
23
unsigned char *filehash,
24
int encryptmode);
25
26
/* Build a single hash using the given data and mode.
27
data, and alignedLen must be multiples of 0x10.
28
cryptkey is NULL for savedata.*/
29
int build_hash(unsigned char *output,
30
unsigned char *data,
31
unsigned int len,
32
unsigned int alignedLen,
33
int mode,
34
unsigned char *cryptkey);
35
36