2
* PSP Software Development Kit - http://www.pspdev.org
3
* -----------------------------------------------------------------------
4
* Licensed under the BSD license, see LICENSE in PSPSDK root for details.
6
* hash.h - Declarations for functions in hash.c
8
* Copyright (c) 2005 Jim Paris <jim@jtan.com>
9
* Coypright (c) 2005 psp123
11
* $Id: hash.h 1559 2005-12-10 01:10:11Z jim $
14
#include <pspchnnlsv.h>
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,
23
unsigned char *filehash,
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,
32
unsigned int alignedLen,
34
unsigned char *cryptkey);