Contents User Forum Source Index APIs by Task APIs by Level Data


G3D::Crypto Class Reference

Cryptography and hashing helper functions. More...

#include <Crypto.h>

List of all members.

Public Member Functions

MD5Hash md5 (const void *bytes, size_t numBytes)

Static Public Member Functions

static uint32 crc32 (const void *bytes, size_t numBytes)
static int numSmallPrimes ()
static int smallPrime (int n)


Detailed Description

Cryptography and hashing helper functions.


Member Function Documentation

static uint32 G3D::Crypto::crc32 ( const void *  bytes,
size_t  numBytes 
) [static]

Computes the CRC32 value of a byte array.

CRC32 is designed to be a hash function that produces different values for similar strings.

This implementation is compatible with PKZIP and GZIP.

Based on http://www.gamedev.net/reference/programming/features/crc32/

MD5Hash G3D::Crypto::md5 ( const void *  bytes,
size_t  numBytes 
)

Computes the MD5 hash (message digest) of a byte stream, as defined by http://www.ietf.org/rfc/rfc1321.txt.

Referenced Code:
Based on implementation by L. Peter Deutsch, ghost@aladdin.com

static int G3D::Crypto::numSmallPrimes (  )  [static]

Returns 1 + the largest value that can be passed to smallPrime.

static int G3D::Crypto::smallPrime ( int  n  )  [static]

Returns the nth prime less than 2000 in constant time.

The first prime has index 0 and is the number 2.


The documentation for this class was generated from the following file:
Generated on Thu Aug 2 11:40:45 2007 for G3D by doxygen 1.5.2
Hosted by SourceForge.net Logo