Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(5)  |  Call(2)  |  Derive(0)  |  Import(3)

src/b/l/BlueCop-XBMC-Plugins-HEAD/script.module.cryptopy/lib/crypto/keyedHash/hmacHash.py   BlueCop-XBMC-Plugins(Download)
        HMAC.__init__(self,SHA1,key)
 
from crypto.hash.md5Hash  import MD5
class HMAC_MD5(HMAC):
    """ Predefined HMAC built on SHA1 """
    def __init__(self, key = None):
        """ optionally initialize with key """
        HMAC.__init__(self,MD5,key)

src/b/l/BlueCop-XBMC-Plugins-HEAD/script.module.cryptopy/lib/crypto/keyedHash/hmacHash_test.py   BlueCop-XBMC-Plugins(Download)
from crypto.keyedHash.hmacHash import HMAC, HMAC_SHA1
from crypto.hash.sha1Hash      import SHA1
from crypto.hash.md5Hash       import MD5
from binascii                  import a2b_hex, b2a_hex
 
    def testMD5_NullKey(self):
        """ HMAC_MD5 testNullKey """
        ki = ''.join([chr(0x36) for i in range(64)])
        ko = ''.join([chr(0x5C) for i in range(64)])
        h = MD5()
        keyedHashAlg = HMAC(MD5,key='')

src/b/l/BlueCop-XBMC-Plugins-HEAD/script.module.cryptopy/lib/crypto/hash/md5Hash_test.py   BlueCop-XBMC-Plugins(Download)
"""
 
from   crypto.hash.md5Hash import MD5
import unittest
from binascii import a2b_hex
    def testFIPS180_1_Appendix_A(self):
        """ APPENDIX A.  A SAMPLE MESSAGE AND ITS MESSAGE DIGEST """
        hashAlg = MD5()
        message        = 'abc'
        message_digest = '900150983cd24fb0d6963f7d28e17f72'