Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
hrydgard
GitHub Repository: hrydgard/ppsspp
Path: blob/master/Core/HLE/sceChnnlsv.h
5765 views
1
// Copyright (c) 2012- PPSSPP Project.
2
3
// This program is free software: you can redistribute it and/or modify
4
// it under the terms of the GNU General Public License as published by
5
// the Free Software Foundation, version 2.0 or later versions.
6
7
// This program is distributed in the hope that it will be useful,
8
// but WITHOUT ANY WARRANTY; without even the implied warranty of
9
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
// GNU General Public License 2.0 for more details.
11
12
// A copy of the GPL 2.0 should have been included with the program.
13
// If not, see http://www.gnu.org/licenses/
14
15
// Official git repository and contact information can be found at
16
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
17
18
#pragma once
19
20
#include "ext/libkirk/kirk_engine.h"
21
22
typedef struct _pspChnnlsvContext1 {
23
/** Cipher mode */
24
s32_le mode;
25
26
/** Context data */
27
u8 result[0x10];
28
u8 key[0x10];
29
s32_le keyLength;
30
} pspChnnlsvContext1;
31
32
typedef struct _pspChnnlsvContext2 {
33
/** Context data */
34
s32_le mode;
35
s32_le unkn;
36
u8 cryptedData[0x92];
37
} pspChnnlsvContext2;
38
39
int sceSdMacInit(pspChnnlsvContext1& ctx, int value);
40
int sceSdMacUpdate(pspChnnlsvContext1& ctx, const u8* data, int length);
41
int sceSdCipherInit(pspChnnlsvContext2& ctx2, int mode, int uknw, u8* data, const u8* cryptkey);
42
int sceSdCipherUpdate(pspChnnlsvContext2& ctx, u8* data, int alignedLen);
43
int sceSdCipherFinal(pspChnnlsvContext2& ctx);
44
int sceSdMacFinal(pspChnnlsvContext1& ctx, u8* in_hash, const u8* in_key);
45
46
KirkState *__ChnnlsvKirkState();
47
48
// deceptively named.
49
void Register_sceChnnlsv();
50
void Register_semaphore();
51
52