]> www.wagner.pp.ru Git - oss/ctypescrypto.git/blob - ctypescrypto/__init__.py
I've discovered Python's __all__ variable and make use of it in all modles
[oss/ctypescrypto.git] / ctypescrypto / __init__.py
1 """
2         Interface to some libcrypto functions
3
4 """
5
6
7 from ctypes import CDLL,c_char_p
8
9 def config(filename=None):
10         """
11                 Loads OpenSSL Config file. If none are specified, loads default
12                 (compiled in) one
13         """
14         libcrypto.OPENSSL_config(filename)
15
16 __all__ = ['bio','cipher','cms','config','digest','ec','engine','exception','oid','pbkdf2','pkey','rand','x509']
17
18 libcrypto = CDLL("libcrypto.so.1.0.0")
19 libcrypto.OPENSSL_config.argtypes=(c_char_p,)
20 libcrypto.OPENSSL_add_all_algorithms_conf()