Object for computing a SHA-1 hash. More...
Public Member Functions | |
| None | __init__ (self) |
| Constructs a eVision.ESha1Hasher object. | |
| None | __init__ (self, eVision.ESha1Hasher other) |
| None | Reset (self) |
| None | Update (self, ctypes.c_void_p data, int len) |
| Updates the current SHA-1 hash with the given data of given length. | |
| str | HashObject (self, eVision.EBaseROI roi) |
| Hash of the given eVision image object including its internal data buffer. | |
| str | HashBuffer (self, eVision.EBaseROI roi) |
| Hash of the data buffer of the given eVision image object. | |
| None | Final (self) |
| Finalize the computation of the SHA-1 hash value. | |
| None | GetHash (self, ctypes.c_void_p uDest) |
| Gets the full hash value as a uint8_t array of size 20 (160bits). | |
| str | GetHash (self) |
| Gets an hexadecimal representation of the hash. | |
| None | Get32BitHash (self, ctypes.c_void_p result) |
| Gets the hash value as a 32-bits interger. | |
Object for computing a SHA-1 hash.
In order to compute a SHA-1 hash, one must call eVision.ESha1Hasher.Update with the data to hash and then call eVision.ESha1Hasher.Final to finalize the SHA-1 hash computation.
If the data comes in chunks (network packets, filesystem read, etc.), you can call eVision.ESha1Hasher.Update for each of your chunks.
Remarks:
License(s): None
| None eVision.ESha1Hasher.__init__ | ( | self | ) |
Constructs a eVision.ESha1Hasher object.
| None eVision.ESha1Hasher.__init__ | ( | self, | |
| eVision.ESha1Hasher | other ) |
| None eVision.ESha1Hasher.Final | ( | self | ) |
Finalize the computation of the SHA-1 hash value.
| None eVision.ESha1Hasher.Get32BitHash | ( | self, | |
| ctypes.c_void_p | result ) |
Gets the hash value as a 32-bits interger.
| str eVision.ESha1Hasher.GetHash | ( | self | ) |
Gets an hexadecimal representation of the hash.
| None eVision.ESha1Hasher.GetHash | ( | self, | |
| ctypes.c_void_p | uDest ) |
Gets the full hash value as a uint8_t array of size 20 (160bits).
| str eVision.ESha1Hasher.HashBuffer | ( | self, | |
| eVision.EBaseROI | roi ) |
Hash of the data buffer of the given eVision image object.
| str eVision.ESha1Hasher.HashObject | ( | self, | |
| eVision.EBaseROI | roi ) |
Hash of the given eVision image object including its internal data buffer.
Remarks:
The hash function work by serializing the object into a eVision.EMemorySerializer.
| None eVision.ESha1Hasher.Reset | ( | self | ) |
| None eVision.ESha1Hasher.Update | ( | self, | |
| ctypes.c_void_p | data, | ||
| int | len ) |
Updates the current SHA-1 hash with the given data of given length.