Пример #1
0
        public Popup(EncryptedItem ei)
        {
            InitializeComponent();
            var decrypted = RSA.Decrypt(ei.Text, ei.PrivateKey);

            lblText.Content = ei.Alias;
            tbText.Text     = decrypted;
        }
Пример #2
0
 public Item(EncryptedItem ei, Get windowGet, DbConnector connector)
 {
     InitializeComponent();
     lblNickname.Content = ei.Alias;
     Tag            = ei;
     this.windowGet = windowGet;
     this.connector = connector;
 }
Пример #3
0
 public void Insert(EncryptedItem item)
 {
     collection.InsertOne(new BsonDocument
     {
         { "text", item.Text },
         { "privateKey", item.PrivateKey },
         { "alias", item.Alias }
     });
 }
Пример #4
0
 public void Remove(EncryptedItem item)
 {
     collection.DeleteOne(Builders <BsonDocument> .Filter.Eq("text", item.Text));
 }