TwlIPL/build/libraries_sysmenu/hotsw/ARM7/include/blowfish.h
(no author) ce1e0cbda0 (更新:Akabane Jumpei)
・関数名の変更
・いらない構造体メンバの削除

git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlIPL/trunk@1107 b08762b0-b915-fc4b-9d8c-17b2551a87ff
2008-04-11 02:18:59 +00:00

50 lines
1.6 KiB
C

/*---------------------------------------------------------------------------*
Project: TwlIPL - HOTSW - include
File: blowfish.h
Copyright 2007-2008 Nintendo. All rights reserved.
These coded instructions, statements, and computer programs contain
proprietary information of Nintendo of America Inc. and/or Nintendo
Company Ltd., and are protected by Federal copyright law. They may
not be disclosed to third parties or copied or duplicated in any form,
in whole or in part, without the prior written consent of Nintendo.
*---------------------------------------------------------------------------*/
#ifndef HOTSW_GCD_BLOWFISH_H
#define HOTSW_GCD_BLOWFISH_H
#include <twl/types.h>
#include <hotswTypes.h>
#ifdef __cplusplus
extern "C" {
#endif
/*************************************************************************/
extern BLOWFISH_CTX HotSwBlowfishInitTableBufDS;
extern BLOWFISH_CTX HotSwBlowfishInitTableTWL;
// Function Prototype ------------------------------------------------------------------------
// Blowfish 初期化
void InitBlowfish(BLOWFISH_CTX *ctx, const unsigned char *key, int keyLen);
// Blowfish KeyとTableの初期化
void InitBlowfishKeyAndTableDS(BLOWFISH_CTX *ctx, u32 *keyBufp, s32 keyLen);
// Blowfish 復号化
void EncryptByBlowfish(const BLOWFISH_CTX *ctx, u32 *xl, u32 *xr);
// Blowfish 暗号化
void DecryptByBlowfish(const BLOWFISH_CTX *ctx, u32 *xl, u32 *xr);
// Key Table の生成
void MakeBlowfishTableDS(CardBootData *cbd, s32 keyLen);
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif // HOTSW_GCD_BLOWFISH_H