mirror of
https://github.com/rvtr/TwlIPL.git
synced 2025-10-31 06:01:12 -04:00
git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlIPL/trunk@1287 b08762b0-b915-fc4b-9d8c-17b2551a87ff
71 lines
2.2 KiB
C
71 lines
2.2 KiB
C
/*---------------------------------------------------------------------------*
|
||
Project: TwlIPL
|
||
File: acsign.h
|
||
|
||
Copyright 2007 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.
|
||
|
||
$Date:: $
|
||
$Rev$
|
||
$Author$
|
||
*---------------------------------------------------------------------------*/
|
||
|
||
#ifndef _ACSIGN_H_
|
||
#define _ACSIGN_H_
|
||
|
||
#ifdef __cplusplus
|
||
extern "C" {
|
||
#endif
|
||
|
||
#if defined( RSA_ENC_DEC )
|
||
#define ACSIGN_BUFFER ((160/8)*4) // 出力バッファ量
|
||
#else
|
||
#define ACSIGN_BUFFER ((160/8)*1) // 出力バッファ量
|
||
#endif
|
||
|
||
//
|
||
int ACSign_Decrypto(
|
||
void* buffer, // 出力領域
|
||
void* sgn_ptr, // データへのポインタ
|
||
void* key_ptr // キーへのポインタ
|
||
);
|
||
|
||
//
|
||
BOOL ACSign_Encrypto(
|
||
void *sign, // 署名出力バッファへのポインタ
|
||
const void *key, // DERフォーマット秘密鍵へのポインタ
|
||
const void *data, // 署名対象データへのポインタ
|
||
int length, // 署名対象データ長
|
||
BOOL isEncodeBER // 署名データをDERエンコードするか?
|
||
);
|
||
|
||
//
|
||
int ACSign_Digest(
|
||
void* buffer, // 出力領域
|
||
void* romh_ptr, // データへのポインタ
|
||
void* mbin_ptr, // データへのポインタ
|
||
int mbin_len, // データの長さ
|
||
void* sbin_ptr, // データへのポインタ
|
||
int sbin_len, // データの長さ
|
||
u32 serial_num // シリアルナンバー
|
||
);
|
||
|
||
//
|
||
int ACSign_Compare(
|
||
void* dercypto, // ACSign_Decryptoの出力
|
||
void* digest // ACSign_Digestの出力
|
||
);
|
||
|
||
void ACSign_SetAllocFunc( void *(*pAlloc)( u32 ), void (*pFree)( void * ) );
|
||
|
||
#ifdef __cplusplus
|
||
}
|
||
#endif
|
||
|
||
#endif //_ACSIGN_H_
|