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

All Samples(29)  |  Call(24)  |  Derive(0)  |  Import(5)

src/s/w/swiftarm-HEAD/tribler/Tribler/dispersy/script.py   swiftarm(Download)
from bloomfilter import BloomFilter
from candidate import BootstrapCandidate
from crypto import ec_generate_key, ec_to_public_bin, ec_to_private_bin
from debug import Node
from dispersy import Dispersy
    def wait_for_wan_address(self):
        ec = ec_generate_key(u"low")
        my_member = Member(ec_to_public_bin(ec), ec_to_private_bin(ec))
        community = DebugCommunity.create_community(my_member)
 
        # create my member
        ec = ec_generate_key(u"low")
        my_member = Member(ec_to_public_bin(ec), ec_to_private_bin(ec))
        dprint("-my member- ", my_member.database_id, " ", id(my_member), " ", my_member.mid.encode("HEX"), force=1)
 
    def run(self):
        ec = ec_generate_key(u"low")
        self._my_member = Member(ec_to_public_bin(ec), ec_to_private_bin(ec))
 
        self.caller(self.load_no_communities)
        # create master member
        ec = ec_generate_key(u"high")
        master = Member(ec_to_public_bin(ec), ec_to_private_bin(ec))
 
        # create community

src/s/w/swiftarm-HEAD/tribler/Tribler/dispersy/debug.py   swiftarm(Download)
import socket
 
from bloomfilter import BloomFilter
from candidate import Candidate
from crypto import ec_generate_key, ec_to_public_bin, ec_to_private_bin, ec_from_private_bin
 
        ec = ec_generate_key(u"low")
        self._my_member = DebugOnlyMember(ec_to_public_bin(ec), ec_to_private_bin(ec))
 
        if identity:

src/s/w/swiftarm-HEAD/tribler/Tribler/dispersy/tool/tracker.py   swiftarm(Download)
from community import Community
from conversion import BinaryConversion
from crypto import ec_generate_key, ec_to_public_bin, ec_to_private_bin
from dispersy import Dispersy
from dprint import dprint
        # generate a new my-member
        ec = ec_generate_key(u"very-low")
        self._my_member = Member(ec_to_public_bin(ec), ec_to_private_bin(ec))
 
        callback.register(self._unload_communities)

src/s/w/swiftarm-HEAD/tribler/Tribler/dispersy/tool/scenarioscript.py   swiftarm(Download)
from sys import maxsize
 
from ..crypto import ec_generate_key, ec_to_public_bin, ec_to_private_bin
from ..dprint import dprint
from ..member import Member
    def scenario_start(self):
        assert self._community is None
        ec = ec_generate_key(self.my_member_security)
        my_member = Member(ec_to_public_bin(ec), ec_to_private_bin(ec))
        self._master_member = Member(self.master_member_public_key)

src/s/w/swiftarm-HEAD/tribler/Tribler/dispersy/community.py   swiftarm(Download)
from candidate import LoopbackCandidate
from conversion import BinaryConversion, DefaultConversion
from crypto import ec_generate_key, ec_to_public_bin, ec_to_private_bin
from decorator import documentation, runtime_duration_warning
from destination import SubjectiveDestination
        assert my_member.private_key, my_member.database_id
        ec = ec_generate_key(u"high")
        master = Member(ec_to_public_bin(ec), ec_to_private_bin(ec))
 
        database = Dispersy.get_instance().database