Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals

psputils.h

Go to the documentation of this file.
00001 /*
00002  * PSP Software Development Kit - http://www.pspdev.org
00003  * -----------------------------------------------------------------------
00004  * Licensed under the BSD license, see LICENSE in PSPSDK root for details.
00005  *
00006  * psputils.h - Prototypes for the sceUtils library.
00007  *
00008  * Copyright (c) 2005 Marcus R. Brown <mrbrown@ocgnet.org>
00009  * Copyright (c) 2005 James Forshaw <tyranid@gmail.com>
00010  * Copyright (c) 2005 John Kelley <ps2dev@kelley.ca>
00011  *
00012  * $Id: psputils.h 701 2005-07-20 16:29:28Z tyranid $
00013  */
00014 #ifndef __UTILS_H__
00015 #define __UTILS_H__
00016 
00017 #include <psptypes.h>
00018 
00019 #ifdef __cplusplus
00020 extern "C" {
00021 #endif
00022 
00023 /* Some of the structures and definitions in this file were extracted from the japanese 
00024    puzzle bobble main executable */
00025 
00031 
00032 #include <sys/time.h>
00033 
00038 time_t sceKernelLibcTime(time_t *t);
00039 
00043 clock_t sceKernelLibcClock(void);
00044 
00048 int sceKernelLibcGettimeofday(struct timeval *tp, struct timezone *tzp);
00049 
00053 void sceKernelDcacheWritebackAll(void);
00054 
00058 void sceKernelDcacheWritebackInvalidateAll(void);
00059 
00061 typedef struct _SceKernelUtilsMt19937Context {
00062         unsigned int    count;
00063         unsigned int    state[624];
00064 } SceKernelUtilsMt19937Context;
00065 
00081 int sceKernelUtilsMt19937Init(SceKernelUtilsMt19937Context *ctx, u32 seed);
00082 
00089 u32 sceKernelUtilsMt19937UInt(SceKernelUtilsMt19937Context *ctx);
00090 
00092 typedef struct _SceKernelUtilsMd5Context {
00093         unsigned int    h[4];
00094         unsigned int    pad;
00095         short unsigned int      usRemains;
00096         short unsigned int      usComputed;
00097         long long unsigned int  ullTotalLen;
00098         unsigned char   buf[64];
00099 } SceKernelUtilsMd5Context;
00100 
00110 int sceKernelUtilsMd5Digest(u8 *data, u32 size, u8 *digest);
00111 
00127 int sceKernelUtilsMd5BlockInit(SceKernelUtilsMd5Context *ctx);
00128 
00138 int sceKernelUtilsMd5BlockUpdate(SceKernelUtilsMd5Context *ctx, u8 *data, u32 size);
00139 
00148 int sceKernelUtilsMd5BlockResult(SceKernelUtilsMd5Context *ctx, u8 *digest);
00149 
00151 typedef struct _SceKernelUtilsSha1Context {
00152         unsigned int    h[5];
00153         short unsigned int      usRemains;
00154         short unsigned int      usComputed;
00155         long long unsigned int  ullTotalLen;
00156         unsigned char   buf[64];
00157 } SceKernelUtilsSha1Context;
00158 
00168 int sceKernelUtilsSha1Digest(u8 *data, u32 size, u8 *digest);
00169 
00186 int sceKernelUtilsSha1BlockInit(SceKernelUtilsSha1Context *ctx);
00187 
00197 int sceKernelUtilsSha1BlockUpdate(SceKernelUtilsSha1Context *ctx, u8 *data, u32 size);
00198 
00207 int sceKernelUtilsSha1BlockResult(SceKernelUtilsSha1Context *ctx, u8 *digest);
00208 
00211 #ifdef __cplusplus
00212 }
00213 #endif
00214 
00215 #endif

Generated on Wed Sep 28 07:52:09 2005 for pspsdk-1.0+beta by  doxygen 1.4.4