Пример #1
0
 public HandshakeParty(HandshakeMaster master, string role, Logger logger)
 {
     m_logger = logger;
     HandshakeMaster.MemberCredetials serverCredentials = master.issueCredentialsForClient(role);
     m_member = new HandshakeMember(serverCredentials.secret, serverCredentials.pseudonym, serverCredentials.role);
     m_logger.WriteLine(role + " pseudonym: " + m_member.getPseudonym());
 }
Пример #2
0
        public MainPage()
        {
            this.InitializeComponent();

            m_logger = new Logger(this.textBox);

            // This one must be called to initialize the random function
            PbcProxy.PBC.init(RANDOM_SEED);

#if false
            // Test PBC
            PbcProxy.PBC.test();

            // Test pairing proxy
            Utils.testPairings();
#endif

            m_master     = new HandshakeMaster();
            m_scanner    = new Scanner(m_master, m_logger);
            m_advertiser = new Advertiser(m_master, m_logger);
        }
Пример #3
0
 public Advertiser(HandshakeMaster master, Logger logger)
     : base(master, SERVER_ROLE, logger)
 {
 }
Пример #4
0
 public Scanner(HandshakeMaster master, Logger logger)
     : base(master, CLIENT_ROLE, logger)
 {
 }