]> Cypherpunks.ru repositories - pygost.git/blobdiff - pygost/iface.py
Move hexdigest implementation to common PEP247 class
[pygost.git] / pygost / iface.py
index 887d69f35793da7322215342dd09217732095c90..e2d6a4c89d5c9c1234726d420ecad54d8977cf57 100644 (file)
@@ -1,6 +1,8 @@
 from abc import ABCMeta
 from abc import abstractmethod
 
+from pygost.utils import hexenc
+
 
 # This function is taken from six package as is
 def add_metaclass(metaclass):
@@ -42,7 +44,7 @@ class PEP247(object):
         """Return the hash value as a string containing 8-bit data.
         """
 
-    @abstractmethod
     def hexdigest(self):
         """Return the hash value as a string containing hexadecimal digits.
         """
+        return hexenc(self.digest())