-
Notifications
You must be signed in to change notification settings - Fork 343
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
s_checksum issues #107
Comments
WenhaoYu, You said you already tried to pass in your own function. Could you post the code you used to do this? It appears that this should have worked. If you want to add an algorithm into the code (which would make sense if it something that a lot of others may want to use), you should modify |
Fix return dummy value in custom checksum (issue #107)
Closed due to inactivity from opener and ottimo's related fix in PR #149. |
Hello everyone,I find if i pass a my own defined algorithm function to s_checksum,it may cause a error. so i check the code,and do some changes as blow:
in checksum.py:
add algorithm argument's type judgement
if type(self._algorithm) is not str:
self.checksum_lengths[self._algorithm.name] = self._length
and in _get_dummy_value function :
def _get_dummy_value(self):
if type(self._algorithm) is str:
return self.checksum_lengths[self._algorithm] * '\x00'
else:
return self.checksum_lengths[self._algorithm.name] * '\x00'
hope it would be helpful or anyone have good idea?
The text was updated successfully, but these errors were encountered: