X-Git-Url: http://wagner.pp.ru/gitweb/?a=blobdiff_plain;ds=sidebyside;f=ctypescrypto%2Fpkey.py;h=c9d252a0d31be6a105357381f3c217081ca9e175;hb=5ac660854747ff0f06fa598fd6130e0f7c5757db;hp=f011443a2173ede8058e21c4323ba2967462ace2;hpb=b4ee51a0aca14c0af5853545b9e524cc1b57b656;p=oss%2Fctypescrypto.git diff --git a/ctypescrypto/pkey.py b/ctypescrypto/pkey.py index f011443..c9d252a 100644 --- a/ctypescrypto/pkey.py +++ b/ctypescrypto/pkey.py @@ -1,26 +1,27 @@ """ -low-level private/public keypair operation +This module provides interface for low-level private/public keypair operation PKey object of this module is wrapper around OpenSSL EVP_PKEY object. """ -This module provides interface for from ctypes import c_char_p,c_void_p,byref,c_int,c_long, c_longlong, create_string_buffer,CFUNCTYPE,POINTER from ctypescrypto import libcrypto from ctypescrypto.exception import LibCryptoError,clear_err_stack from ctypescrypto.bio import Membio import sys + +__all__ = ['PKeyError','password_callback','PKey'] class PKeyError(LibCryptoError): pass CALLBACK_FUNC=CFUNCTYPE(c_int,c_char_p,c_int,c_int,c_char_p) def password_callback(buf,length,rwflag,u): -""" -Example password callback for private key. Assumes that -password is store in the userdata parameter, so allows to pass password -from constructor arguments to the libcrypto keyloading functions -""" + """ + Example password callback for private key. Assumes that + password is store in the userdata parameter, so allows to pass password + from constructor arguments to the libcrypto keyloading functions + """ cnt=len(u) if length