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

All Samples(11)  |  Call(11)  |  Derive(0)  |  Import(0)

src/c/y/cyberflex-shell-HEAD/cards/passport_application.py   cyberflex-shell(Download)
 
        S = rnd_ifd + rnd_icc + Kifd
        Eifd = crypto_utils.cipher(True, "des3-cbc", Kenc, S, "\x00"*8)
        Mifd = self._mac(Kmac, Eifd)
        if verbose:
            print "Micc verified OK"
 
        R = crypto_utils.cipher(False, "des3-cbc", Kenc, Eicc, "\x00"*8)
        if verbose:
            print "R       = %s" % hexdump(R, indent=10)
            topad = 8 - len(data) % 8
            data = data + "\x80" + ("\x00" * (topad-1))
        a = crypto_utils.cipher(True, "des-cbc", key[:8], data, "\x00"*8)
        b = crypto_utils.cipher(False, "des-ecb", key[8:16], a[-8:])
        c = crypto_utils.cipher(True, "des-ecb", key[:8], b)

src/c/y/cyberflex-shell-HEAD/cards/tcos_card.py   cyberflex-shell(Download)
                        print "|| " + "\n|| ".join( utils.hexdump( value_ ).splitlines() )
 
                    value = crypto_utils.cipher( True, 
                        self.get_cipherspec(config),
                        self.get_key(config),
                        print "|| " + "\n|| ".join( utils.hexdump( value_ ).splitlines() )
 
                    value = pi + crypto_utils.cipher( True,
                        self.get_cipherspec(config),
                        self.get_key(config),
                    print "|| " + "\n|| ".join( utils.hexdump( value ).splitlines() )
 
                value_ = crypto_utils.cipher( False, 
                    self.get_cipherspec(config),
                    self.get_key(config),
                    print "|| " + "\n|| ".join( utils.hexdump( value[1:] ).splitlines() )
 
                value_ = crypto_utils.cipher( False,
                    self.get_cipherspec(config),
                    self.get_key(config),
    def _mac(self, config, data):
        return crypto_utils.cipher( True, 
            self.get_cipherspec(config),
            self.get_key(config),
            data,

src/c/y/cyberflex-shell-HEAD/cyberflex-shell.py   cyberflex-shell(Download)
                fp.close()
 
        result = crypto_utils.cipher(mode == MODE_ENCRYPT, cipher, key, text, iv)
 
        self.card.last_result = utils.R_APDU(result+"\x00\x00")