Skip to content
This repository has been archived by the owner on Jun 11, 2023. It is now read-only.

Commit

Permalink
Drop compatible codes
Browse files Browse the repository at this point in the history
  • Loading branch information
xymy committed Mar 16, 2020
1 parent 56c6146 commit bf09c82
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions xycrypto/hashes.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,7 @@ def update(self, data):
def finalize(self):
"""Finalize the current context and return the message digest as bytes."""

try:
finalize_func = getattr(self._ctx, 'digest')
except AttributeError:
finalize_func = getattr(self._ctx, 'finalize')
return finalize_func()
return self._ctx.digest() # note the interface of stdlib

def copy(self):
"""Copy the current context."""
Expand Down

0 comments on commit bf09c82

Please sign in to comment.