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

All Samples(28)  |  Call(13)  |  Derive(0)  |  Import(15)

src/b/l/BlueCop-XBMC-Plugins-HEAD/script.module.cryptopy/lib/crypto/cipher/cbc.py   BlueCop-XBMC-Plugins(Download)
    Read LICENSE.txt for license information.
"""
from crypto.cipher.base import BlockCipher, padWithPadLen, noPadding
from crypto.errors      import EncryptError
from crypto.common      import xor
        self.keySize    = self.baseCipher.keySize
        self.padding    = padding
        self.baseCipher.padding = noPadding()   # baseCipher should NOT pad!!
        self.r          = Random()            # for IV generation, currently uses
                                              # mediocre standard distro version     <----------------

src/b/l/BlueCop-XBMC-Plugins-HEAD/script.module.cryptopy/lib/crypto/cipher/aes_cbc.py   BlueCop-XBMC-Plugins(Download)
from crypto.cipher.aes  import AES
from crypto.cipher.cbc  import CBC
from crypto.cipher.base import BlockCipher, padWithPadLen, noPadding
 
class AES_CBC(CBC):
    """ AES encryption in CBC feedback mode """
    def __init__(self, key=None, padding=padWithPadLen(), keySize=16):
        CBC.__init__( self, AES(key, noPadding(), keySize), padding)

src/b/l/BlueCop-XBMC-Plugins-HEAD/script.module.cryptopy/lib/crypto/cipher/rijndael.py   BlueCop-XBMC-Plugins(Download)
"""
 
from crypto.cipher.base import BlockCipher, padWithPadLen, noPadding
 
class Rijndael(BlockCipher):

src/b/l/BlueCop-XBMC-Plugins-HEAD/script.module.cryptopy/lib/crypto/cipher/icedoll.py   BlueCop-XBMC-Plugins(Download)
"""
 
from crypto.cipher.base import BlockCipherWithIntegrity, padWithPadLen, noPadding
from crypto.cipher.rijndael import  *
from binascii_plus import b2a_hex

src/b/l/BlueCop-XBMC-Plugins-HEAD/script.module.cryptopy/lib/crypto/cipher/aes.py   BlueCop-XBMC-Plugins(Download)
 
from crypto.cipher.rijndael import Rijndael
from crypto.cipher.base     import BlockCipher, padWithPadLen, noPadding
from crypto.errors          import BadKeySizeError
 

src/b/l/BlueCop-XBMC-Plugins-HEAD/script.module.cryptopy/lib/crypto/cipher/ccm.py   BlueCop-XBMC-Plugins(Download)
    Read LICENSE.txt for license information.
"""
from crypto.cipher.base import BlockCipherWithIntegrity, noPadding
from crypto.common      import xor
from struct             import unpack, pack
        self.keySize    = self.baseCipher.keySize
 
        self.baseCipher.padding = noPadding()   # baseCipher should NOT pad!!
 
 

src/b/l/BlueCop-XBMC-Plugins-HEAD/script.module.cryptopy/lib/crypto/entropy/prn_rijndael.py   BlueCop-XBMC-Plugins(Download)
 
from crypto.cipher.rijndael import Rijndael
from crypto.cipher.base     import noPadding
from binascii import b2a_hex
 
    def __init__(self, seed=defaultSeed):
        self.__algorithm = Rijndael(padding=noPadding(),keySize=32, blockSize=32)
        self.reset()
        self.reseed(seed)
 

src/p/y/python-crunchyroll-HEAD/crunchyroll/subtitles.py   python-crunchyroll(Download)
try:
    from crypto.cipher.aes_cbc import AES_CBC
    from crypto.cipher.base import noPadding
    _LEGACY_CRYPTO = True
except ImportError:
            def decrypt_func(data):
                cipher = AES_CBC(encryption_key, padding=noPadding(),
                    keySize=len(encryption_key))
                return cipher.decrypt(iv + data)
        else:

src/b/l/BlueCop-XBMC-Plugins-HEAD/script.module.cryptopy/lib/crypto/icedoll_test.py   BlueCop-XBMC-Plugins(Download)
"""
from crypto.cipher.icedoll  import Icedoll
from crypto.cipher.base     import noPadding
from binascii               import a2b_hex
from binascii_plus          import b2a_p, a2b_p
    def testDctEqPt(self):
        """ test of plaintext = decrypt(encrypt(plaintext)) """
        alg = Icedoll( 16*chr(0), padding=noPadding())
        pt  = 16*4*'a'             # block aligned
        ct  = alg.encrypt(pt)

src/b/l/BlueCop-XBMC-Plugins-HEAD/script.module.cryptopy/lib/crypto/cipher/rijndael_test.py   BlueCop-XBMC-Plugins(Download)
"""
from crypto.cipher.rijndael import Rijndael
from crypto.cipher.base     import noPadding
from binascii               import a2b_hex
import unittest
            kSize = len(bkey)
            bSize = len(cipherText) # set block size to length of block
            alg = Rijndael(bkey, keySize=kSize, blockSize=bSize, padding=noPadding())
 
            self.assertEqual( alg.encrypt(plainText),  cipherText )

  1 | 2  Next