/*1* PSP Software Development Kit - http://www.pspdev.org2* -----------------------------------------------------------------------3* Licensed under the BSD license, see LICENSE in PSPSDK root for details.4*5* encrypt.h - Declarations for functions in encrypt.c6*7* Copyright (c) 2005 Jim Paris <[email protected]>8* Coypright (c) 2005 psp1239*10* $Id: encrypt.h 1559 2005-12-10 01:10:11Z jim $11*/1213#include <pspchnnlsv.h>1415/* Encrypt the given plaintext file, and update the message16authentication hashes in the param.sfo. The data_filename is17usually the final component of encrypted_filename, e.g. "DATA.BIN".18See main.c for an example of usage. */19int encrypt_file(const char *plaintext_filename,20const char *encrypted_filename,21const char *data_filename,22const char *paramsfo_filename,23const char *paramsfo_filename_out,24const unsigned char *gamekey,25const int mainSdkVersion);2627/* Do the actual hardware encryption.28mode is 3 for saves with a cryptkey, or 1 otherwise.29data, alignedLen, cryptkey, and hash must be multiples of 0x10.30cryptkey is NULL if mode == 1.31*/32int encrypt_data(unsigned int mode,33unsigned char *data,34int *dataLen,35int *alignedLen,36unsigned char *hash,37unsigned char *cryptkey);383940