31class EXPCL_PANDA_EXPRESS HashVal {
34 INLINE HashVal(
const HashVal ©);
35 INLINE
void operator = (
const HashVal ©);
37 INLINE
bool operator == (
const HashVal &other)
const;
38 INLINE
bool operator != (
const HashVal &other)
const;
39 INLINE
bool operator < (
const HashVal &other)
const;
40 INLINE
int compare_to(
const HashVal &other)
const;
44 INLINE
void output_dec(std::ostream &out)
const;
51 INLINE
void output(std::ostream &out)
const;
53 std::string
as_dec()
const;
56 std::string
as_hex()
const;
59 vector_uchar
as_bin()
const;
62 INLINE
void write_datagram(
Datagram &destination)
const;
64 INLINE
void write_stream(
StreamWriter &destination)
const;
68 bool hash_file(
const Filename &filename);
69 bool hash_stream(std::istream &stream);
70 INLINE
void hash_ramfile(
const Ramfile &ramfile);
71 INLINE
void hash_string(
const std::string &data);
72 INLINE
void hash_bytes(
const vector_uchar &data);
73 void hash_buffer(
const char *buffer,
int length);
77 static void encode_hex(uint32_t val,
char *buffer);
78 static void decode_hex(
const char *buffer, uint32_t &val);
79 INLINE
static char tohex(
unsigned int nibble);
80 INLINE
static unsigned int fromhex(
char digit);
85INLINE std::ostream &operator << (std::ostream &out,
const HashVal &hv);
A class to retrieve the individual data elements previously stored in a Datagram.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...
The name of a file, such as a texture file or an Egg file.
Stores a 128-bit value that represents the hashed contents (typically MD5) of a file or buffer.
void input_binary(std::istream &in)
Inputs the HashVal as a binary stream of bytes in order.
void output_dec(std::ostream &out) const
Outputs the HashVal as four unsigned decimal integers.
void output_hex(std::ostream &out) const
Outputs the HashVal as a 32-digit hexadecimal number.
bool set_from_bin(const vector_uchar &text)
Sets the HashVal from a 16-byte binary string.
void output_binary(std::ostream &out) const
Outputs the HashVal as a binary stream of bytes in order.
void input_dec(std::istream &in)
Inputs the HashVal as four unsigned decimal integers.
bool set_from_hex(const std::string &text)
Sets the HashVal from a 32-byte hexademical string.
std::string as_dec() const
Returns the HashVal as a string with four decimal numbers.
std::string as_hex() const
Returns the HashVal as a 32-byte hexadecimal string.
bool set_from_dec(const std::string &text)
Sets the HashVal from a string with four decimal numbers.
void merge_with(const HashVal &other)
Generates a new HashVal representing the xor of this one and the other one.
vector_uchar as_bin() const
Returns the HashVal as a 16-byte binary string.
void input_hex(std::istream &in)
Inputs the HashVal as a 32-digit hexadecimal number.
An in-memory buffer specifically designed for downloading files to memory.
A class to read sequential binary data directly from an istream.
A StreamWriter object is used to write sequential binary data directly to an ostream.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.