Rhino C++ API
8.10
|
#include <opennurbs_md5.h>
Public Member Functions | |
ON_MD5_Hash () | |
Default constructor is the zero digest hash. More... | |
ON_MD5_Hash (const ON_MD5_Hash &)=default | |
~ON_MD5_Hash ()=default | |
void | Dump (class ON_TextLog &text_log) const |
ON_MD5_Hash & | operator= (const ON_MD5_Hash &)=default |
bool | Read (class ON_BinaryArchive &archive) |
const ON_wString | ToString (bool bUpperCaseHexadecimalDigits) const |
const ON_String | ToUTF8String (bool bUpperCaseHexadecimalDigits) const |
bool | Write (class ON_BinaryArchive &archive) const |
Static Public Member Functions | |
static ON_MD5_Hash | BufferHash (const void *buffer, size_t sizeof_buffer) |
static int | Compare (const ON_MD5_Hash &a, const ON_MD5_Hash &b) |
static ON_MD5_Hash | FileHash (const char *filename, ON__UINT64 &sizeof_file) |
static ON_MD5_Hash | FileHash (const wchar_t *filename, ON__UINT64 &sizeof_file) |
static ON_MD5_Hash | FileHash (FILE *file, ON__UINT64 &sizeof_file) |
static ON_MD5_Hash | StringHash (const char *str, size_t str_length, ON__UINT64 &byte_count) |
static ON_MD5_Hash | StringHash (const ON_String &str, ON__UINT64 &byte_count) |
static ON_MD5_Hash | StringHash (const ON_wString &str, ON__UINT64 &byte_count) |
static ON_MD5_Hash | StringHash (const wchar_t *str, size_t str_length, ON__UINT64 &byte_count) |
Public Attributes | |
ON__UINT8 | m_digest [16] |
Static Public Attributes | |
static const ON_MD5_Hash | EmptyContentHash |
MD5 hash of zero bytes. More... | |
static const ON_MD5_Hash | ZeroDigest |
all digest bytes are zero More... | |
Copyright (c) 1993-2022 Robert McNeel & Associates. All rights reserved. OpenNURBS, Rhinoceros, and Rhino3D are registered trademarks of Robert McNeel & Associates.
THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY. ALL IMPLIED WARRANTIES OF FITNESS FOR ANY PARTICULAR PURPOSE AND OF MERCHANTABILITY ARE HEREBY DISCLAIMED.
For complete openNURBS copyright information see http://www.opennurbs.org. The ON_MD5 class is based on code that is modified from C code with the following copyright.
Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All rights reserved.
License to copy and use this software is granted provided that it is identified as the "RSA Data Security, Inc. MD5 Message-Digest Algorithm" in all material mentioning or referencing this software or this function.
License is also granted to make and use derivative works provided that such works are identified as "derived from the RSA Data Security, Inc. MD5 Message-Digest Algorithm" in all material mentioning or referencing the derived work.
RSA Data Security, Inc. makes no representations concerning either the merchantability of this software or the suitability of this software for any particular purpose. It is provided "as is" without express or implied warranty of any kind.
These notices must be retained in any copies of any part of this documentation and/or software.
ON_MD5_Hash::ON_MD5_Hash | ( | ) |
Default constructor is the zero digest hash.
|
default |
|
default |
|
static |
Parameters: buffer - [in] sizeof_buffer - [in] number of bytes in buffer Returns: MD5 hash of the buffer.
|
static |
void ON_MD5_Hash::Dump | ( | class ON_TextLog & | text_log | ) | const |
|
static |
|
static |
Parameters: filename - [in] Name of file sizeof_file - [out] number of bytes in file Returns: MD5 hash of the buffer.
|
static |
Parameters: file - [in] File stream from ON_FileStream::Open(...,L"rb"); sizeof_file - [out] number of bytes in file Returns: MD5 hash of the file stream from the current offset to the end of the file.
|
default |
bool ON_MD5_Hash::Read | ( | class ON_BinaryArchive & | archive | ) |
|
static |
|
static |
Parameters: str - [in] byte_count - [out] number of bytes in the string. Returns: MD5 hash of the UTF-8 encoding of the string. (Platforms and endian independent.)
|
static |
Parameters: str - [in] string byte_count - [out] number of bytes in UTF-8 encoding of the string. Returns: MD5 hash of the UTF-8 encoding of the string. (Platforms and endian independent.)
|
static |
const ON_wString ON_MD5_Hash::ToString | ( | bool | bUpperCaseHexadecimalDigits | ) | const |
Parameters: bUpperCaseHexadecimalDigits - [in] false - use 0-9, a-f true - use 0-9, A-F Returns: The MD5 hash value as a 32 hexadecimal digits. The first digit in the string is the hexadecimal value of m_digest[0].
const ON_String ON_MD5_Hash::ToUTF8String | ( | bool | bUpperCaseHexadecimalDigits | ) | const |
Parameters: bUpperCaseHexadecimalDigits - [in] false - use 0-9, a-f true - use 0-9, A-F Returns: The MD5 hash value as a 32 hexadecimal digits. The first digit in the string is the hexadecimal value of m_digest[0].
bool ON_MD5_Hash::Write | ( | class ON_BinaryArchive & | archive | ) | const |
|
static |
MD5 hash of zero bytes.
ON__UINT8 ON_MD5_Hash::m_digest[16] |
|
static |
all digest bytes are zero