#include <juce_MD5.h>
Public Member Functions | |
MD5 () | |
Creates a null MD5 object. | |
MD5 (const MD5 &) | |
Creates a copy of another MD5. | |
MD5 & | operator= (const MD5 &) |
Copies another MD5. | |
MD5 (const MemoryBlock &) noexcept | |
Creates a checksum for a block of binary data. | |
MD5 (const void *data, size_t numBytes) noexcept | |
Creates a checksum for a block of binary data. | |
MD5 (InputStream &input, int64 numBytesToRead=-1) | |
Creates a checksum for the input from a stream. | |
MD5 (const File &) | |
Creates a checksum for the contents of a file. | |
MD5 (CharPointer_UTF8 utf8Text) noexcept | |
Creates a checksum of the characters in a UTF-8 buffer. | |
~MD5 () | |
Destructor. | |
MemoryBlock | getRawChecksumData () const |
Returns the checksum as a 16-byte block of data. | |
const uint8 * | getChecksumDataArray () const noexcept |
Returns a pointer to the 16-byte array of result data. | |
String | toHexString () const |
Returns the checksum as a 32-digit hex string. | |
bool | operator== (const MD5 &) const noexcept |
bool | operator!= (const MD5 &) const noexcept |
Static Public Member Functions | |
static MD5 | fromUTF32 (StringRef) |
Creates an MD5 from a little-endian UTF-32 encoded string. | |
MD5 checksum class.
Create one of these with a block of source data or a stream, and it calculates the MD5 checksum of that data.
You can then retrieve this checksum as a 16-byte block, or as a hex string.
MD5::MD5 | ( | ) |
Creates a null MD5 object.
|
explicitnoexcept |
Creates a checksum for a block of binary data.
|
noexcept |
Creates a checksum for a block of binary data.
MD5::MD5 | ( | InputStream & | input, |
int64 | numBytesToRead = -1 ) |
Creates a checksum for the input from a stream.
This will read up to the given number of bytes from the stream, and produce the checksum of that. If the number of bytes to read is negative, it'll read until the stream is exhausted.
|
explicit |
Creates a checksum for the contents of a file.
|
explicitnoexcept |
MD5::~MD5 | ( | ) |
Destructor.
MemoryBlock MD5::getRawChecksumData | ( | ) | const |
Returns the checksum as a 16-byte block of data.
|
noexcept |
Returns a pointer to the 16-byte array of result data.
String MD5::toHexString | ( | ) | const |
Returns the checksum as a 32-digit hex string.
Creates an MD5 from a little-endian UTF-32 encoded string.
Note that this method is provided for backwards-compatibility with the old version of this class, which had a constructor that took a string and performed this operation on it. In new code, you shouldn't use this, and are recommended to use the constructor that takes a CharPointer_UTF8 instead.
|
noexcept |
|
noexcept |