X-Git-Url: https://www.wagner.pp.ru/gitweb/?a=blobdiff_plain;f=ctypescrypto%2Fcipher.py;h=815a42541897232853a0721b9fea12be9d42217b;hb=ca6a5055ad8a9ea82e9f42aff3c906903d5e6df7;hp=332272570f824c9830dbe003a09c123f138b5aa7;hpb=7b9c29e43612629052e0ec875fd9ecbb35b0b02d;p=oss%2Fctypescrypto.git diff --git a/ctypescrypto/cipher.py b/ctypescrypto/cipher.py index 3322725..815a425 100644 --- a/ctypescrypto/cipher.py +++ b/ctypescrypto/cipher.py @@ -171,7 +171,7 @@ class Cipher: """ if self.cipher_finalized : raise CipherError("No updates allowed") - if type(data) != type(""): + if not isinstance(data,str): raise TypeError("A string is expected") if len(data) <= 0: return ""