mirror of
https://github.com/rvtr/twl_wrapsdk.git
synced 2025-10-31 06:11:10 -04:00
add HMAC into systemCall.h
git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/twl_wrapsdk/trunk@304 4ee2a332-4b2b-5046-8439-1ba90f034370
This commit is contained in:
parent
395c3f4d5e
commit
1c63ba713c
@ -17,6 +17,8 @@
|
|||||||
#ifndef TWL_OS_SYSTEMCALL_H_
|
#ifndef TWL_OS_SYSTEMCALL_H_
|
||||||
#define TWL_OS_SYSTEMCALL_H_
|
#define TWL_OS_SYSTEMCALL_H_
|
||||||
|
|
||||||
|
#define SVC_SHA1_BLOCK_SIZE 64
|
||||||
|
#define SVC_SHA1_DIGEST_SIZE 20
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@ -40,6 +42,14 @@ typedef struct SVCSHA1Context
|
|||||||
}
|
}
|
||||||
SVCSHA1Context;
|
SVCSHA1Context;
|
||||||
|
|
||||||
|
typedef struct SVCHMACSHA1Context
|
||||||
|
{
|
||||||
|
SVCSHA1Context sha1_ctx;
|
||||||
|
u8 key[SVC_SHA1_BLOCK_SIZE];
|
||||||
|
u32 keylen;
|
||||||
|
}
|
||||||
|
SVCHMACSHA1Context;
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
void* output;
|
void* output;
|
||||||
@ -97,18 +107,22 @@ int SVC_RandomSHA1(
|
|||||||
unsigned int src_len // “ü—̓f<C692>[ƒ^‚Ì’·‚³
|
unsigned int src_len // “ü—̓f<C692>[ƒ^‚Ì’·‚³
|
||||||
);
|
);
|
||||||
|
|
||||||
int SVC_UncompressLZ8FromDevice( const void* srcp,
|
s32 SVC_UncompressLZ8FromDevice( const void* srcp,
|
||||||
void* destp,
|
void* destp,
|
||||||
const void* paramp,
|
const void* paramp,
|
||||||
const MIReadStreamCallbacks *callbacks
|
const MIReadStreamCallbacks *callbacks
|
||||||
);
|
);
|
||||||
|
|
||||||
int SVC_UncompressLZ16FromDeviceIMG( const void* srcp,
|
s32 SVC_UncompressLZ16FromDeviceIMG( const void* srcp,
|
||||||
void* destp,
|
void* destp,
|
||||||
const void* paramp,
|
const void* paramp,
|
||||||
const MIReadStreamCallbacks *callbacks
|
const MIReadStreamCallbacks *callbacks
|
||||||
);
|
);
|
||||||
|
|
||||||
|
void SVC_HMACSHA1Init( SVCHMACSHA1Context *ctx, const void *key, u32 keylen );
|
||||||
|
void SVC_HMACSHA1Update( SVCHMACSHA1Context *ctx, const void *data, u32 len );
|
||||||
|
void SVC_HMACSHA1GetHash( SVCHMACSHA1Context *ctx, u8* md );
|
||||||
|
void SVC_CalcHMACSHA1( void* md, const void* data, u32 len, void* key, u32 keylen );
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user