public OnboardingViewModel(IXDSSecService xdsCryptoService, AppRepository appRepository, DeviceVaultService deviceVaultService)
 {
     this.xdsCryptoService   = xdsCryptoService;
     this.appRepository      = appRepository;
     this.deviceVaultService = deviceVaultService;
     this.Name = ProfileViewModel.DefaultUsername;
 }
Exemplo n.º 2
0
        public AppRepository(FStoreConfig fStoreConfig, IXDSSecService xdsSecService)
        {
            this.profiles = new FStoreRepository <Profile>(new FStoreMono(fStoreConfig), RepositorySerializer.Serialize, RepositorySerializer.Deserialize <Profile>);
            this.contacts = new FStoreRepository <Identity>(new FStoreMono(fStoreConfig), RepositorySerializer.Serialize, RepositorySerializer.Deserialize <Identity>);
            this.messages = new FStoreRepository <Message>(new FStoreMono(fStoreConfig), RepositorySerializer.Serialize, RepositorySerializer.Deserialize <Message>);

            RepositorySerializer.XDSSecService = xdsSecService;
        }
Exemplo n.º 3
0
 public PortableChatEncryptionService(IDependencyInjection dependencyInjection, ILoggerFactory loggerFactory, IXDSSecService ixdsCryptoService, AppRepository appRepository, ProfileViewModel profileViewModel, E2ERatchet e2ERatchet)
 {
     this.logger            = loggerFactory.CreateLogger <PortableChatEncryptionService>();
     this.ixdsCryptoService = ixdsCryptoService;
     this.repo             = appRepository;
     this.profileViewModel = profileViewModel;
     this.e2ERatchet       = e2ERatchet;
 }
Exemplo n.º 4
0
 public TLSClient(ILoggerFactory loggerFactory, IChatClient chatClient, IXDSSecService ixdsCryptoService, ITcpConnection tcpConnection, IUdpConnection udpConnection, AppState appState)
 {
     this._log              = loggerFactory.CreateLogger <TLSClient>();
     this._chatClient       = chatClient;
     this.ixdsCryptoService = ixdsCryptoService;
     this._tcp              = tcpConnection;
     this._udp              = udpConnection;
     this._appState         = appState;
 }
Exemplo n.º 5
0
 public TLSClientRatchet(string myId, byte[] myPrivateKey, TLSUser server, IXDSSecService ixdsCryptoService)
 {
     Guard.NotNull(myId, myPrivateKey, server, ixdsCryptoService);
     Guard.NotNull(server.StaticPublicKey);
     this.MyId               = myId;
     this._myIdBytes         = Encoding.UTF8.GetBytes(this.MyId);
     this._server            = server;
     this.ixdsCryptoService  = ixdsCryptoService;
     this._server.AuthSecret = this.ixdsCryptoService.CalculateAndHashSharedSecret(myPrivateKey, this._server.StaticPublicKey);
 }
Exemplo n.º 6
0
 public SetupView(Toplevel topLevel) : base(topLevel)
 {
     this.mainWindow              = (Window)topLevel;
     this.messageBoxService       = App.ServiceProvider.Get <IMessageBoxService>();
     this.onboardingViewModel     = App.ServiceProvider.Get <OnboardingViewModel>();
     this.stopwatch               = new Stopwatch();
     this.xdsSecService           = App.ServiceProvider.Get <IXDSSecService>();
     this.chatClientConfiguration = App.ServiceProvider.GetService <IChatClientConfiguration>();
     this.cancellation            = App.ServiceProvider.Get <ICancellation>();
 }
Exemplo n.º 7
0
 public static IXDSSecService Instance()
 {
     if (_visualCrypt2Service == null)
     {
         lock (lockObject)
         {
             if (_visualCrypt2Service == null)
             {
                 _visualCrypt2Service = new XDSSecService();
                 _visualCrypt2Service.Init(new Platform_NetStandard());
             }
         }
     }
     return(_visualCrypt2Service);
 }
Exemplo n.º 8
0
 public ChatWorker(ILoggerFactory loggerFactory, ICancellation cancellation, AppState appState, AppRepository appRepository, ITcpConnection tcpConnection, IUdpConnection udpConnection, IChatClient chatClient, IXDSSecService ixdsCryptoService, IChatEncryptionService chatEncryptionService, E2ERatchet e2eRatchet, ContactListManager contactListManager)
 {
     this.logger                = loggerFactory.CreateLogger <ChatWorker>();
     this.appState              = appState;
     this.repo                  = appRepository;
     this.tcp                   = tcpConnection;
     this.udp                   = udpConnection;
     this.chatClient            = chatClient;
     this.ixdsCryptoService     = ixdsCryptoService;
     this.chatEncryptionService = chatEncryptionService;
     this.e2eRatchet            = e2eRatchet;
     this.contactListManager    = contactListManager;
     this.cancellation          = cancellation;
     cancellation.RegisterWorker(this);
 }
Exemplo n.º 9
0
 public TLSServerRatchet(string serverId, byte[] serverPrivateKey, IXDSSecService ixdsCryptoService)
 {
     this.ServerId          = serverId;
     this._serverPrivateKey = serverPrivateKey;
     this.ixdsCryptoService = ixdsCryptoService;
 }
Exemplo n.º 10
0
 public PrincipalFactory(IXDSSecService xdsCryptoService)
 {
     this.xdsCryptoService = xdsCryptoService;
 }
Exemplo n.º 11
0
 public TLSRequestHandler(string nodeId, IXDSSecService visualCrypt2Service, CommandProcessor commandProcessor, ILoggerFactory loggerFactory)
 {
     this.commandProcessor = commandProcessor;
     this.tlsServerRatchet = new TLSServerRatchet(nodeId, NodeKeys.NodePrivateKey, visualCrypt2Service);
     this.logger           = loggerFactory.CreateLogger(this.GetType().FullName);
 }
Exemplo n.º 12
0
 public DeviceVaultService(AppRepository appRepository, IXDSSecService xdsCryptoService)
 {
     this.repo             = appRepository;
     this.xdsCryptoService = xdsCryptoService;
 }
Exemplo n.º 13
0
 public E2ERatchet(IXDSSecService ixdsCryptoService)
 {
     this.ixdsCryptoService = ixdsCryptoService;
 }