- if self.digest_finalized:\r
- raise DigestError, "No updates allowed"\r
- if type(data) != type(""):\r
- raise TypeError, "A string is expected"\r
- result = libcrypto.EVP_DigestUpdate(self.ctx, c_char_p(data), len(data))\r
- if result != 1:\r
- raise DigestError, "Unable to update digest"\r
- \r
- def digest(self, data=None):\r
+ if self.digest_finalized:\r
+ raise DigestError, "No updates allowed"\r
+ if type(data) != type(""):\r
+ raise TypeError, "A string is expected"\r
+ result = libcrypto.EVP_DigestUpdate(self.ctx, c_char_p(data), len(data))\r
+ if result != 1:\r
+ raise DigestError, "Unable to update digest"\r
+ \r
+ def digest(self, data=None):\r