tzh
2024-08-22 c7d0944258c7d0943aa7b2211498fd612971ce27
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Q\¬Qc@s´dZddlZejddeƒejddeƒddlZddlZddlZddlZddlm    Z    dej
fd„ƒYZ d    „Z e d
kr°e ƒndS( sV
Test suite to check compilance with PEP 247, the standard API
for hashing algorithms
iÿÿÿÿNtignoresthe md5 module is deprecated.*sthe sha module is deprecated.*(t test_supportt
Pep247TestcBs/eZdd„Zd„Zd„Zd„ZRS(c Cs|jt|dƒƒ|j|jdkp7|jdkƒ|dk    r«|j|ƒ}|j|dƒ}|j|dƒjƒ}|j|ƒ}|jdƒ|jƒ}nU|jƒ}|jdƒ}|jdƒjƒ}|jƒ}|jdƒ|jƒ}|j||ƒ|jt|dƒƒ|jdk    rN|j|j|jƒn|j|jt|ƒƒ|jdƒ|j    ƒ}|j|jƒ|jƒƒ|j|j
ƒ|j
ƒƒ|jƒ|j
ƒ}    }
d} x"|    D]} | dt | ƒ7} qÞW|j| |
ƒdS(Nt digest_sizeitstringts%02x( t
assertTruethasattrRtNonetnewtdigesttupdatet assertEqualtlentcopyt    hexdigesttord( tselftmoduletkeytobj1tobj2th1tobj3th2tobj_copyR
Rthd2tbyte((sX/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_pep247.pyt check_modules:%         cCs|jtƒdS(N(Rtmd5(R((sX/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_pep247.pyttest_md5=scCs|jtƒdS(N(Rtsha(R((sX/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_pep247.pyttest_sha@scCs|jtddƒdS(NRtabc(Rthmac(R((sX/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_pep247.pyt    test_hmacCsN(t__name__t
__module__RRRR R#(((sX/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_pep247.pyRs (        cCstjtƒdS(N(Rt run_unittestR(((sX/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_pep247.pyt    test_mainFst__main__(t__doc__twarningstfilterwarningstDeprecationWarningR"RRtunittestttestRtTestCaseRR'R$(((sX/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_pep247.pyt<module>s       3