PSPSDK 2026-01-13
Loading...
Searching...
No Matches
pspamctrl.h
Go to the documentation of this file.
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 * pspamctrl.h - Prototypes for the sceAmctrl_driver library.
7 *
8 * Copyright (c) 2024 GrayJack <gr41.j4ck@gmail.com>
9 *
10 * TODO: Contribute this header to PSPSDK
11 */
12
13#ifndef _PSP_AM_CTRL_H
14#define _PSP_AM_CTRL_H
15
16#include <psptypes.h>
17
18#ifdef __cplusplus
19extern "C" {
20#endif // __cplusplus
21
22
23typedef struct SceMacKey {
24 int type;
25 u8 key[16];
26 u8 pad[16];
29
35
45
52
57
58#ifdef __KERNEL__
59
60int sceDrmBBMacInit(SceMacKey *mac_key, int type);
61int sceDrmBBMacUpdate(SceMacKey *mac_key, u8 *buf, int size);
62int sceAmctrl_driver_9227EA79(SceMacKey *mac_key, u8 *buf, int size);
63int sceDrmBBMacFinal(SceMacKey *mac_key, u8 *buf, u8 *version_key);
64int sceDrmBBMacFinal2(SceMacKey *mac_key, u8 *buf, u8 *version_key);
65
66int sceDrmBBCipherInit(SceCipherKey *cipher_key, int type, int mode, u8 *header_key, u8 *version_key, int seed);
67int sceDrmBBCipherUpdate(SceCipherKey *cipher_key, u8 *buf, int size);
68int sceAmctrl_driver_E04ADD4C(SceCipherKey *cipher_key, u8 *buf, int size);
69int sceDrmBBCipherFinal(SceCipherKey *cipher_key);
70
71#endif // __KERNEL__
72
73#ifdef __cplusplus
74}
75#endif // __cplusplus
76
77#endif // AM_CTRL_H
SceCipherKeyMode
Definition pspamctrl.h:53
@ CIPHER_KEY_MODE_ENCRYPT
Definition pspamctrl.h:54
@ CIPHER_KEY_MODE_DECRYPT
Definition pspamctrl.h:55
SceMacKeyType
Definition pspamctrl.h:36
@ MAC_KEY_TYPE_UNK0
Definition pspamctrl.h:37
@ MAC_KEY_TYPE_FIXED
Use fixed key.
Definition pspamctrl.h:42
@ MAC_KEY_TYPE_UNK1
Definition pspamctrl.h:38
@ MAC_KEY_TYPE_FUSE_ID
Use fuse ID.
Definition pspamctrl.h:40
@ MAC_KEY_TYPE_UNK6
Definition pspamctrl.h:43
struct SceMacKey SceMacKey
SceCipherKeyType
Definition pspamctrl.h:46
@ CIPHER_KEY_TYPE_FUSE_ID
Use fuse ID.
Definition pspamctrl.h:50
@ CIPHER_KEY_TYPE_FIXED
Use fixed key.
Definition pspamctrl.h:48
struct SceCipherKey SceCipherKey
uint8_t u8
Definition psptypes.h:38
uint32_t u32
Definition psptypes.h:41
Definition pspamctrl.h:30
u8 key[16]
Definition pspamctrl.h:33
u32 seed
Definition pspamctrl.h:32
u32 type
Definition pspamctrl.h:31
Definition pspamctrl.h:23
u8 pad[16]
Definition pspamctrl.h:26
int pad_size
Definition pspamctrl.h:27
u8 key[16]
Definition pspamctrl.h:25
int type
Definition pspamctrl.h:24