// Copyright (c) 2012- PPSSPP Project.12// This program is free software: you can redistribute it and/or modify3// it under the terms of the GNU General Public License as published by4// the Free Software Foundation, version 2.0 or later versions.56// This program is distributed in the hope that it will be useful,7// but WITHOUT ANY WARRANTY; without even the implied warranty of8// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the9// GNU General Public License 2.0 for more details.1011// A copy of the GPL 2.0 should have been included with the program.12// If not, see http://www.gnu.org/licenses/1314// Official git repository and contact information can be found at15// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.1617#pragma once1819#include "ext/libkirk/kirk_engine.h"2021typedef struct _pspChnnlsvContext1 {22/** Cipher mode */23s32_le mode;2425/** Context data */26u8 result[0x10];27u8 key[0x10];28s32_le keyLength;29} pspChnnlsvContext1;3031typedef struct _pspChnnlsvContext2 {32/** Context data */33s32_le mode;34s32_le unkn;35u8 cryptedData[0x92];36} pspChnnlsvContext2;3738int sceSdMacInit(pspChnnlsvContext1& ctx, int value);39int sceSdMacUpdate(pspChnnlsvContext1& ctx, const u8* data, int length);40int sceSdCipherInit(pspChnnlsvContext2& ctx2, int mode, int uknw, u8* data, const u8* cryptkey);41int sceSdCipherUpdate(pspChnnlsvContext2& ctx, u8* data, int alignedLen);42int sceSdCipherFinal(pspChnnlsvContext2& ctx);43int sceSdMacFinal(pspChnnlsvContext1& ctx, u8* in_hash, const u8* in_key);4445KirkState *__ChnnlsvKirkState();4647// deceptively named.48void Register_sceChnnlsv();49void Register_semaphore();505152