ok
Direktori : /proc/thread-self/root/proc/self/root/lib64/python2.7/site-packages/M2Crypto/ |
Current File : //proc/thread-self/root/proc/self/root/lib64/python2.7/site-packages/M2Crypto/DSA.pyo |
� �1Mc @ s� d Z d d l Z d d l Z d d l Z d d l Z d e f d � � YZ e j e � d d d � � YZ d e f d � � YZ e j d � Z d � Z e j d � Z e j d � Z e j d � Z e j d � Z e j d � Z e j d � Z d S( s� M2Crypto wrapper for OpenSSL DSA API. Copyright (c) 1999-2003 Ng Pheng Siong. All rights reserved. Portions created by Open Source Applications Foundation (OSAF) are Copyright (C) 2004 OSAF. All Rights Reserved. i����Nt DSAErrorc B s e Z RS( ( t __name__t __module__( ( ( s2 /usr/lib64/python2.7/site-packages/M2Crypto/DSA.pyR s t DSAc B s� e Z d Z e j Z d d � Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z d e j d � Z d e j d � Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z RS( sA This class is a context supporting DSA key and parameter values, signing and verifying. Simple example:: from M2Crypto import EVP, DSA, util message = 'Kilroy was here!' md = EVP.MessageDigest('sha1') md.update(message) digest = md.final() dsa = DSA.gen_params(1024) dsa.gen_key() r, s = dsa.sign(digest) good = dsa.verify(digest, r, s) if good: print ' ** success **' else: print ' ** verification failed **' i c C s | | _ | | _ d S( sI Use one of the factory functions to create an instance. N( t dsat _pyfree( t selfR R ( ( s2 /usr/lib64/python2.7/site-packages/M2Crypto/DSA.pyt __init__, s c C s) t | d d � r% | j | j � n d S( NR i ( t getattrt m2_dsa_freeR ( R ( ( s2 /usr/lib64/python2.7/site-packages/M2Crypto/DSA.pyt __del__4 s c C s t j | j � S( sp Return the key length. @rtype: int @return: the DSA key length in bits ( t m2t dsa_keylenR ( R ( ( s2 /usr/lib64/python2.7/site-packages/M2Crypto/DSA.pyt __len__8 s c C s9 | d k r/ t t d | f � } | | j � St � d S( s5 Return specified DSA parameters and key values. @type name: str @param name: name of variable to be returned. Must be one of 'p', 'q', 'g', 'pub', 'priv'. @rtype: str @return: value of specified variable (a "byte string") t pt qt gt pubt privs dsa_get_%sN( R R R R R ( R R R t AttributeError( R t namet method( ( s2 /usr/lib64/python2.7/site-packages/M2Crypto/DSA.pyt __getattr__B s c C sG | d k r t d � � n( | d k r6 t d � � n | | j | <d S( NR R R s set (p, q, g) via set_params()R R s"