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

All Samples(10)  |  Call(6)  |  Derive(0)  |  Import(4)

src/f/r/FriendlyTorrent-HEAD/src/tornado/BitTornado/BT1/NatCheck.py   FriendlyTorrent(Download)
from socket import error as socketerror
from traceback import print_exc
from BitTornado.BTcrypto import Crypto, CRYPTO_OK
 
try:
            if encrypted:
                self._dc = not(CRYPTO_OK and CHECK_PEER_ID_ENCRYPTED)
                self.encrypter = Crypto(True, disable_crypto = self._dc)
                self.write(self.encrypter.pubkey+self.encrypter.padding())
            else:

src/b/i/BitTornado-HEAD/BitTornado/BT1/NatCheck.py   BitTornado(Download)
from socket import error as socketerror
from BitTornado.BTcrypto import Crypto, CRYPTO_OK
from Encrypter import tobinary16, toint, option_pattern
 
CHECK_PEER_ID_ENCRYPTED = True
            if encrypted:
                self._dc = not(CRYPTO_OK and CHECK_PEER_ID_ENCRYPTED)
                self.encrypter = Crypto(True, disable_crypto=self._dc)
                self.write(self.encrypter.pubkey + self.encrypter.padding())
            else:

src/f/r/FriendlyTorrent-HEAD/src/tornado/BitTornado/BT1/Encrypter.py   FriendlyTorrent(Download)
from urllib import quote
from traceback import print_exc
from BitTornado.BTcrypto import Crypto
 
try:
            if encrypted:
                self.encrypted = True
                self.encrypter = Crypto(True)
                self.write(self.encrypter.pubkey+self.encrypter.padding())
            else:
        if not self.encrypted:
            self.encrypted = True
            self.encrypter = Crypto(self.locally_initiated)
        self._write_buffer(s)
        return self.encrypter.keylength, self.read_crypto_header

src/b/i/BitTornado-HEAD/BitTornado/BT1/Encrypter.py   BitTornado(Download)
import socket
import urllib
from binascii import hexlify, unhexlify
from BitTornado.BTcrypto import Crypto
 
            if encrypted:
                self.encrypted = True
                self.encrypter = Crypto(True)
                self.write(self.encrypter.pubkey + self.encrypter.padding())
            else:
        if not self.encrypted:
            self.encrypted = True
            self.encrypter = Crypto(self.locally_initiated)
        self._write_buffer(s)
        return self.encrypter.keylength, self.read_crypto_header