Tryag File Manager
Home
-
Turbo Force
Current Path :
/
usr
/
lib
/
python2.4
/
site-packages
/
M2Crypto
/
Upload File :
New :
File
Dir
//usr/lib/python2.4/site-packages/M2Crypto/DSA.pyo
mò Ô'rDc @ sì d Z d k Z d k Z d k Z d k Z d e f d „ ƒ YZ e i e ƒ d f d „ ƒ YZ d e f d „ ƒ YZ e i d „ Z d „ Z e i d „ Z e i d „ Z e i d „ Z e i d „ Z e i d „ Z e i 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. Nt DSAErrorc B s t Z RS( N( t __name__t __module__( ( ( t0 /usr/lib/python2.4/site-packages/M2Crypto/DSA.pyR s t DSAc B sÎ t Z d Z e i Z d d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d e i d „ Z d e i d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z RS( s@ 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 selft _pyfree( R R R ( ( R t __init__, s c C s+ t | d d ƒ o | i | i ƒ n d S( NR i ( t getattrR t m2_dsa_freeR ( R ( ( R t __del__4 s c C s t i | i ƒ S( sp Return the key length. @rtype: int @return: the DSA key length in bits N( t m2t dsa_keylenR R ( R ( ( R t __len__8 s c C sM | d d d d d g j o' t t d | f ƒ } | | i ƒ Sn t ‚ 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( t nameR R t methodR R t AttributeError( R R R ( ( R t __getattr__B s c C sZ | d d d g j o t d ƒ ‚ n1 | d d g j o t d ƒ ‚ n | | i | <d S( NR R R s set (p, q, g) via set_params()R R s"