Split some common code into a separate "tools" file
[svpe-tools.git] / tools.h
blob4ff8abf228c70a7b331b4820cee462d09fd4a665
1 #ifndef _TOOLS_H
2 #define _TOOLS_H
4 typedef unsigned char u8;
5 typedef unsigned short u16;
6 typedef unsigned int u32;
7 typedef unsigned long long u64;
9 u32 be32(u8 *p);
10 u64 be64(u8 *p);
11 u64 be34(u8 *p);
13 u8 disc_key[16];
15 void aes_cbc_dec(u8 *key, u8 *iv, u8 *in, u32 len, u8 *out);
16 void decrypt_title_key(u8 *title_key, u8 *title_id);
18 void fatal(const char *s);
20 void print_bytes(u8 *x, u32 n);
22 #endif