Main Page | Modules | File List | File Members

Public key cryptography

Asymetric cryptosystem interface. More...

Functions

GShandle InitializePKC (GSCRYPTO_PKC_ALGO eAlgo)
 Initialize the hash context.

GSvoid UninitializePKC (GShandle hPKC)
 Uninitiaze the hash module.

GSbool RandomInit (GShandle hPKC, RANDOM_STRUCT *pRandomData)
GSbool RandomUpdate (GShandle hPKC, RANDOM_STRUCT *pRandomData, GSubyte *block, GSuint blockLen)
GSvoid RandomFinal (GShandle hPKC, RANDOM_STRUCT *pRandomData)
GSint GetRandomBytesNeeded (GShandle hPKC, GSuint *bytesNeeded, RANDOM_STRUCT *pRandomData)
GSbool GenerateKeyPair (GShandle hPKC, RSA_PUBLIC_KEY *pPublicKey, RSA_PRIVATE_KEY *pPrivateKey, RSA_PROTO_KEY *pProtoKey, RANDOM_STRUCT *pRandomData)
GSbool PublicEncrypt (GShandle hPKC, GSubyte *pInputBuffer, GSuint uiInputBufferLength, GSubyte *pOutputBuffer, GSuint *pOutputBufferLength, RSA_PUBLIC_KEY *pPublicKey, RANDOM_STRUCT *pRandomData)
GSbool PrivateEncrypt (GShandle hPKC, GSubyte *pInputBuffer, GSuint uiInputBufferLength, GSubyte *pOutputBuffer, GSuint *pOutputBufferLength, RSA_PRIVATE_KEY *pPrivateKey)
GSbool PublicDecrypt (GShandle hPKC, GSubyte *pInputBuffer, GSuint uiInputBufferLength, GSubyte *pOutputBuffer, GSuint *pOutputBufferLength, RSA_PUBLIC_KEY *pPublicKey)
GSbool PrivateDecrypt (GShandle hPKC, GSubyte *pInputBuffer, GSuint uiInputBufferLength, GSubyte *pOutputBuffer, GSuint *pOutputBufferLength, RSA_PRIVATE_KEY *pPrivateKey)

Detailed Description

These functions are used to the encrypt data using public key encryption algorithms.

Function Documentation

GShandle InitializePKC GSCRYPTO_PKC_ALGO  eAlgo  ) 
 

Description:
This function will initialize the hash context. This must be called before any call to the UpdateHash() function. This function will return GS_FALSE if the hash context is not yet terminated.
Returns:
Status of the function call
Return values:
Identification of the hash algorithm created
NULL if the operation failed
Parameters:
IN eAlgo The type of hash algorithm to use.

GSvoid UninitializePKC GShandle  hPKC  ) 
 

Description:
Uninitiaze the hash module
Returns:
void
Parameters:
hHash Handle on the hash module


Ubi.com GameService SDK - ©UbiSoft Entertainment 2002
GameService development team