]> www.wagner.pp.ru Git - oss/ctypescrypto.git/blobdiff - ctypescrypto/engine.py
I've discovered Python's __all__ variable and make use of it in all modles
[oss/ctypescrypto.git] / ctypescrypto / engine.py
index 47f4878d72d9c542a5659002302d72375c46c5b5..898b20dc4c0268f687a443373dc569e5fe06ec5c 100644 (file)
@@ -1,9 +1,19 @@
+"""
+engine loading and configuration
+"""
 from ctypes import *
 from ctypescrypto import libcrypto
 from ctypescrypto.exception import LibCryptoError
+
+__all__=['default','set_default']
+
 default=None
 
 def set_default(engine):
+       """
+               Loads specified engine and sets it as default for all 
+               algorithms, supported by it
+       """
        global default
        e=libcrypto.ENGINE_by_id(engine)
        if e is None:
@@ -25,3 +35,4 @@ libcrypto.ENGINE_by_id.restype=c_void_p
 libcrypto.ENGINE_by_id.argtypes=(c_char_p,)
 libcrypto.ENGINE_set_default.argtypes=(c_void_p,c_int)
 libcrypto.ENGINE_ctrl_cmd_string.argtypes=(c_void_p,c_char_p,c_char_p,c_int)
+libcrypto.ENGINE_finish.argtypes=(c_char_p,)