PSPSDK 2026-02-25
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
18typedef struct SceMacKey {
19 int type;
20 u8 key[16];
21 u8 pad[16];
24
30
40
47
52
53#ifdef __cplusplus
54extern "C" {
55#endif // __cplusplus
56
57int sceDrmBBMacInit(SceMacKey *mac_key, int type);
58int sceDrmBBMacUpdate(SceMacKey *mac_key, u8 *buf, int size);
59int sceAmctrl_driver_9227EA79(SceMacKey *mac_key, u8 *buf, int size);
60int sceDrmBBMacFinal(SceMacKey *mac_key, u8 *buf, u8 *version_key);
61int sceDrmBBMacFinal2(SceMacKey *mac_key, u8 *buf, u8 *version_key);
62
63int sceDrmBBCipherInit(SceCipherKey *cipher_key, int type, int mode, u8 *header_key, u8 *version_key, int seed);
64int sceDrmBBCipherUpdate(SceCipherKey *cipher_key, u8 *buf, int size);
65int sceAmctrl_driver_E04ADD4C(SceCipherKey *cipher_key, u8 *buf, int size);
67
68#ifdef __cplusplus
69}
70#endif // __cplusplus
71
72#endif // AM_CTRL_H
int sceDrmBBMacUpdate(SceMacKey *mac_key, u8 *buf, int size)
int sceDrmBBCipherInit(SceCipherKey *cipher_key, int type, int mode, u8 *header_key, u8 *version_key, int seed)
int sceDrmBBMacInit(SceMacKey *mac_key, int type)
int sceDrmBBMacFinal2(SceMacKey *mac_key, u8 *buf, u8 *version_key)
int sceDrmBBCipherFinal(SceCipherKey *cipher_key)
SceCipherKeyMode
Definition pspamctrl.h:48
@ CIPHER_KEY_MODE_ENCRYPT
Definition pspamctrl.h:49
@ CIPHER_KEY_MODE_DECRYPT
Definition pspamctrl.h:50
int sceDrmBBMacFinal(SceMacKey *mac_key, u8 *buf, u8 *version_key)
SceMacKeyType
Definition pspamctrl.h:31
@ MAC_KEY_TYPE_UNK0
Definition pspamctrl.h:32
@ MAC_KEY_TYPE_FIXED
Use fixed key.
Definition pspamctrl.h:37
@ MAC_KEY_TYPE_UNK1
Definition pspamctrl.h:33
@ MAC_KEY_TYPE_FUSE_ID
Use fuse ID.
Definition pspamctrl.h:35
@ MAC_KEY_TYPE_UNK6
Definition pspamctrl.h:38
int sceAmctrl_driver_9227EA79(SceMacKey *mac_key, u8 *buf, int size)
int sceDrmBBCipherUpdate(SceCipherKey *cipher_key, u8 *buf, int size)
struct SceMacKey SceMacKey
SceCipherKeyType
Definition pspamctrl.h:41
@ CIPHER_KEY_TYPE_FUSE_ID
Use fuse ID.
Definition pspamctrl.h:45
@ CIPHER_KEY_TYPE_FIXED
Use fixed key.
Definition pspamctrl.h:43
int sceAmctrl_driver_E04ADD4C(SceCipherKey *cipher_key, u8 *buf, int size)
struct SceCipherKey SceCipherKey
uint8_t u8
Definition psptypes.h:38
uint32_t u32
Definition psptypes.h:41
Definition pspamctrl.h:25
u8 key[16]
Definition pspamctrl.h:28
u32 seed
Definition pspamctrl.h:27
u32 type
Definition pspamctrl.h:26
Definition pspamctrl.h:18
u8 pad[16]
Definition pspamctrl.h:21
int pad_size
Definition pspamctrl.h:22
u8 key[16]
Definition pspamctrl.h:20
int type
Definition pspamctrl.h:19