eVision Python API
Loading...
Searching...
No Matches
eVision.ESha1Hasher Class Reference

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.

Detailed Description

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

Constructor & Destructor Documentation

◆ __init__() [1/2]

None eVision.ESha1Hasher.__init__ ( self)

Constructs a eVision.ESha1Hasher object.

◆ __init__() [2/2]

None eVision.ESha1Hasher.__init__ ( self,
eVision.ESha1Hasher other )

Member Function Documentation

◆ Final()

None eVision.ESha1Hasher.Final ( self)

Finalize the computation of the SHA-1 hash value.

◆ Get32BitHash()

None eVision.ESha1Hasher.Get32BitHash ( self,
ctypes.c_void_p result )

Gets the hash value as a 32-bits interger.

◆ GetHash() [1/2]

str eVision.ESha1Hasher.GetHash ( self)

Gets an hexadecimal representation of the hash.

◆ GetHash() [2/2]

None eVision.ESha1Hasher.GetHash ( self,
ctypes.c_void_p uDest )

Gets the full hash value as a uint8_t array of size 20 (160bits).

◆ HashBuffer()

str eVision.ESha1Hasher.HashBuffer ( self,
eVision.EBaseROI roi )

Hash of the data buffer of the given eVision image object.

◆ HashObject()

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.

◆ Reset()

None eVision.ESha1Hasher.Reset ( self)

◆ Update()

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.