mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +00:00
[10097] Update G3D up to v8.0b4
+ Got rid of zip lib requirement in G3D...
Still can re-enable code by defining _HAVE_ZIP...
+ Remove silly X11 lib dependency from G3D
Code doesn't seem to do anything yet anyway, and even if, we don't want it :p
+ Fix another weird G3D build problem...
+ Remove some __asm usage in g3d, which is not available on Win64
My editor also decided to remove a ton of trailing white spaces...tss...
+ Reapply G3D fixes for 64bit VC
+ not use SSE specific header when SSE not enabled in *nix
+ Updated project files
+ New vmap_assembler VC90/VC80 Project
+ vmap assembler binaries updates
NOTE: Old vmap fikes expected work (as tests show) with new library version.
But better use new generated versions. Its different in small parts to bad or good...
(based on Lynx3d's repo commit 44798d3)
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
2f3c518935
commit
ae3ad10bcf
235 changed files with 58189 additions and 4547 deletions
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
@file Crypto.h
|
||||
|
||||
@maintainer Morgan McGuire, matrix@graphics3d.com
|
||||
@maintainer Morgan McGuire, http://graphics.cs.williams.edu
|
||||
|
||||
|
||||
@created 2006-03-29
|
||||
|
|
@ -17,6 +17,48 @@
|
|||
|
||||
namespace G3D {
|
||||
|
||||
/** See G3D::Crypto::md5 */
|
||||
class MD5Hash {
|
||||
private:
|
||||
|
||||
uint8 value[16];
|
||||
|
||||
public:
|
||||
|
||||
MD5Hash() {
|
||||
for (int i = 0; i < 16; ++i) {
|
||||
value[i] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
explicit MD5Hash(class BinaryInput& b);
|
||||
|
||||
uint8& operator[](int i) {
|
||||
return value[i];
|
||||
}
|
||||
|
||||
const uint8& operator[](int i) const {
|
||||
return value[i];
|
||||
}
|
||||
|
||||
bool operator==(const MD5Hash& other) const {
|
||||
bool match = true;
|
||||
for (int i = 0; i < 16; ++i) {
|
||||
match = match && (other.value[i] == value[i]);
|
||||
}
|
||||
return match;
|
||||
}
|
||||
|
||||
inline bool operator!=(const MD5Hash& other) const {
|
||||
return !(*this == other);
|
||||
}
|
||||
|
||||
void deserialize(class BinaryInput& b);
|
||||
|
||||
void serialize(class BinaryOutput& b) const;
|
||||
};
|
||||
|
||||
|
||||
/** Cryptography and hashing helper functions */
|
||||
class Crypto {
|
||||
public:
|
||||
|
|
@ -31,6 +73,14 @@ public:
|
|||
*/
|
||||
static uint32 crc32(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.
|
||||
|
||||
@cite Based on implementation by L. Peter Deutsch, ghost@aladdin.com
|
||||
*/
|
||||
MD5Hash md5(const void* bytes, size_t numBytes);
|
||||
|
||||
/**
|
||||
Returns the nth prime less than 2000 in constant time. The first prime has index
|
||||
0 and is the number 2.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue