How do I select proper data-types to do this in Python ?
You could use Python strings (str
) for both the input and the output.
If you do, you'll be able to use hashlib.sha1()
directly, without needing any datatype conversions.
Pergunta
I am working on a project related to Data deduplication. I need to design a fingerprint calculation module (to calculate the fingerprint of file chunk) which will take two inputs and give an output.
Input : some_module(unsigned char*buffer, uint32 buffer_length)
output: unsigned char* fingerprint
I have been asked to design a class to implement above the module. I will use hashlib
but my question is How do I select proper data-types to do this in Python ?
Solução
How do I select proper data-types to do this in Python ?
You could use Python strings (str
) for both the input and the output.
If you do, you'll be able to use hashlib.sha1()
directly, without needing any datatype conversions.