SSBM Decomp
Loading...
Searching...
No Matches
crypt.c File Reference
#include "crypt.h"
#include <string.h>

Functions

void HSD_Checksum (u8 *src, int len, void *dest)
 Simple additive checksum using the MD5 intial state. Not the MD5 algorithm.
static int encryptByte (u8 prev, s32 cur)
static void encryptAt (u8 *ptr)
int HSD_Encrypt (u8 *data, int len)
static int decryptByte (u32 prev, u32 cur)
int HSD_Decrypt (u8 *data, int len)

Variables

static s32 keys []
const u8 n_keys = ARRAY_SIZE(keys)

Function Documentation

◆ HSD_Checksum()

void HSD_Checksum ( u8 * src,
int len,
void * dest )

Simple additive checksum using the MD5 intial state. Not the MD5 algorithm.

◆ encryptByte()

int encryptByte ( u8 prev,
s32 cur )
static

◆ encryptAt()

void encryptAt ( u8 * ptr)
inlinestatic

◆ HSD_Encrypt()

int HSD_Encrypt ( u8 * data,
int len )
Returns
0 if success, -1 if error

◆ decryptByte()

int decryptByte ( u32 prev,
u32 cur )
static

◆ HSD_Decrypt()

int HSD_Decrypt ( u8 * data,
int len )
Returns
0 if success, -1 if error

Variable Documentation

◆ keys

s32 keys[]
static
Initial value:
= {
0x26, 0xFF, 0xE8, 0xEF, 0x42, 0xD6, 0x01,
0x54, 0x14, 0xA3, 0x80, 0xFD, 0x6E,
}

◆ n_keys

const u8 n_keys = ARRAY_SIZE(keys)