PCL
|
Abstract base class for cryptographic hashing algorithm implementations. More...
#include <Cryptography.h>
Public Member Functions | |
CryptographicHash ()=default | |
CryptographicHash (const CryptographicHash &)=delete | |
virtual | ~CryptographicHash () |
virtual String | AlgorithmName () const =0 |
ByteArray | Finalize () |
template<class C > | |
ByteArray | Hash (const C &data) |
ByteArray | Hash (const void *data, size_type length) |
void | Hash (uint8 *hash, const void *data, size_type length) |
virtual size_type | HashLength () const =0 |
virtual void | Initialize ()=0 |
CryptographicHash & | operator= (const CryptographicHash &)=delete |
virtual void | Update (const void *data, size_type length)=0 |
template<class C > | |
void | UpdateWithContainer (const C &data) |
Protected Member Functions | |
virtual void | DoFinalize (void *hash)=0 |
CryptographicHash defines a common interface for implementations of cryptographic hashing algorithms such as MD-5, SHA-1 or SHA-256.
Definition at line 85 of file Cryptography.h.
|
default |
Default constructor.
|
inlinevirtual |
Destroys a CryptographicHash object.
Definition at line 97 of file Cryptography.h.
|
delete |
Copy constructor. This constructor is disabled because CryptographicHash objects are unique.
|
pure virtual |
Returns the name of this cryptographic hashing algorithm.
Implemented in pcl::CryptographicHashFactory, pcl::SHA512, pcl::SHA384, pcl::SHA256, pcl::SHA224, pcl::SHA1, and pcl::MD5.
|
protectedpure virtual |
Terminates hash generation and returns the computed message digest (hash value) stored in the specified hash array. The specified array must provide room for at least HashLength() bytes, that is, the length in bytes of the message digest produced by this hashing algorithm.
|
inline |
Terminates hash generation and returns the computed message digest as a ByteArray instance.
Definition at line 154 of file Cryptography.h.
References pcl::Array< T, A >::Begin().
|
inline |
Returns the hash sequence (message digest) corresponding to a container data with contiguous storage as a ByteArray instance.
The C
template argument must be a class with PCL container semantics (the Begin() and Size() member functions are required). Typically the ByteArray class is used, although any array-like class with contiguous storage is appropriate, including Array, String, Vector and Matrix.
Definition at line 196 of file Cryptography.h.
Returns the hash sequence (message digest) corresponding to a data block of the specified length in bytes, as a ByteArray instance.
Definition at line 179 of file Cryptography.h.
References pcl::Array< T, A >::Begin().
Returns the hash sequence (message digest) corresponding to a data block of the specified length in bytes, stored in the specified hash array. The specified array must provide room for at least HashLength() bytes, that is, the length in bytes of the message digest produced by this hashing algorithm.
Definition at line 168 of file Cryptography.h.
Referenced by pcl::AES256::AES256().
|
pure virtual |
Returns the length in bytes of a hash sequence (or message digest) calculated with this cryptographic hashing algorithm.
Implemented in pcl::CryptographicHashFactory, pcl::SHA512, pcl::SHA384, pcl::SHA256, pcl::SHA224, pcl::SHA1, and pcl::MD5.
|
pure virtual |
Initializes this cryptographic hash generator.
Implemented in pcl::CryptographicHashFactory, pcl::SHA512, pcl::SHA384, pcl::SHA256, pcl::SHA224, pcl::SHA1, and pcl::MD5.
|
delete |
Copy assignment. This operator is disabled because CryptographicHash objects are unique.
|
pure virtual |
Updates the hash generator with a new data chunk of the specified length in bytes.
Implemented in pcl::CryptographicHashFactory, pcl::SHA512, pcl::SHA384, pcl::SHA256, pcl::SHA224, pcl::SHA1, and pcl::MD5.
|
inline |
Updates the hash generator with data from a container with contiguous storage.
The C
template argument must be a class with PCL container semantics (the Begin() and Size() member functions are required). Typically the ByteArray class is used, although any array-like class with contiguous storage is appropriate, including String, IsoString, Vector and Matrix.
Definition at line 145 of file Cryptography.h.