Beispiel #1
0
 def hex(self, x):
     if self.algorithm == 'MD5':
         return hexmd5(x)
     elif self.algorithm == 'SHA1':
         return hexsha1(x)
     else:
         raise ValueError('Unknown algorithm %s' % self.algorithm)
Beispiel #2
0
 def hex(self, x):
     if self.algorithm == 'MD5':
         return hexmd5(x)
     elif self.algorithm == 'SHA1':
         return hexsha1(x)
     else:
         raise ValueError('Unknown algorithm %s' % self.algorithm)