#include <juce_MD5.h>
Public Member Functions | |
MD5 () | |
Creates a null MD5 object. More... | |
MD5 (CharPointer_UTF8 utf8Text) noexcept | |
Creates a checksum of the characters in a UTF-8 buffer. More... | |
MD5 (const File &) | |
Creates a checksum for the contents of a file. More... | |
MD5 (const MD5 &) | |
Creates a copy of another MD5. More... | |
MD5 (const MemoryBlock &) noexcept | |
Creates a checksum for a block of binary data. More... | |
MD5 (const void *data, size_t numBytes) noexcept | |
Creates a checksum for a block of binary data. More... | |
MD5 (InputStream &input, int64 numBytesToRead=-1) | |
Creates a checksum for the input from a stream. More... | |
~MD5 () | |
Destructor. More... | |
const uint8 * | getChecksumDataArray () const noexcept |
Returns a pointer to the 16-byte array of result data. More... | |
MemoryBlock | getRawChecksumData () const |
Returns the checksum as a 16-byte block of data. More... | |
bool | operator!= (const MD5 &) const noexcept |
MD5 & | operator= (const MD5 &) |
Copies another MD5. More... | |
bool | operator== (const MD5 &) const noexcept |
String | toHexString () const |
Returns the checksum as a 32-digit hex string. More... | |
Static Public Member Functions | |
static MD5 | fromUTF32 (StringRef) |
Creates an MD5 from a little-endian UTF-32 encoded string. More... | |
Private Member Functions | |
MD5 (const String &)=delete | |
void | processStream (InputStream &, int64) |
Private Attributes | |
uint8 | result [16] = {} |
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.
@tags{Cryptography}
juce::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.
juce::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 |
juce::MD5::~MD5 | ( | ) |
Destructor.
|
explicitprivatedelete |
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.
|
inlinenoexcept |
Returns a pointer to the 16-byte array of result data.
References juce::gl::result.
MemoryBlock juce::MD5::getRawChecksumData | ( | ) | const |
Returns the checksum as a 16-byte block of data.
|
private |
String juce::MD5::toHexString | ( | ) | const |
Returns the checksum as a 32-digit hex string.
|
private |