]> www.wagner.pp.ru Git - oss/ctypescrypto.git/blobdiff - ctypescrypto/rand.py
Fixes some style. Improved tests coverage for bio,oid,digest and cipher. Prepare...
[oss/ctypescrypto.git] / ctypescrypto / rand.py
index 4cc86e297fe0151264c517133a96b4c32822aa10..4bc073a1ceb63f727d6022e5586d85d577084dbf 100644 (file)
@@ -47,7 +47,7 @@ def seed(data, entropy=None):
                If entropy is not None, it should be floating point(double)
                value estimating amount of entropy  in the data (in bytes).
        """
-       if type(data) != type(""):
+       if not isinstance(data,str):
                raise TypeError("A string is expected")
        ptr = c_char_p(data)
        size = len(data)