~ppsspp/ppsspp/ppsspp_1.3.0

« back to all changes in this revision

Viewing changes to Tools/SaveTool/hash.h

  • Committer: Sérgio Benjamim
  • Date: 2017-01-02 00:12:05 UTC
  • Revision ID: sergio_br2@yahoo.com.br-20170102001205-cxbta9za203nmjwm
1.3.0 source (from ppsspp_1.3.0-r160.p5.l1762.a165.t83~56~ubuntu16.04.1.tar.xz).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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 <jim@jtan.com>
 
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);