July 23, 2017, 9:27 a.m.


XOR, cmake, Qt

XOR-encryption is the application of a key through bitwise exclusive OR to the source text. The mechanism of the bitwise exclusive is the following:

0 0 0
0 1 1
1 0 1
1 1 0

Thus, when executing an exclusive OR, there will always be a zero value if the variables have the same values.

The peculiarity of XOR is that one and the same function can both encrypt data and decrypt it. This is a simple method of data encryption, which can be hacked quickly enough if there is a large enough encrypted text, or a large password dictionary. But nevertheless, this can already be used for small initial data protection.

In the context of Qt, the use of XOR is no different from how the program was written without using Qt. The question here is how to extract data for encryption from QString objects, for example, if the text was entered in QTextEdit.

To do this, write a program that contains:

  • QTextEdit, In which the text will be entered, which will be encrypted.
  • QLineEdit, In which the encryption key will be entered.
  • QPushButton, In the slot of the click handler of which, data encryption / decryption will be performed. Again, I note that the method will be used the same.

The program will look like this:

July 23, 2017, 4:05 a.m.


Qt, cmake, C++

Write "Hello, World !!!" On Qt in the IDE CLion using the CMAKE build system. The emphasis on the fact that the project is being developed in IDE CLion was made because to work with the project it is necessary to make a small adjustment for working with CMAKE .

The result is the following application:

July 22, 2019, 7:26 a.m.
Pavel K.

Qt - Test 001. Signals and slots

  • Result:68points,
  • Rating points-1
July 22, 2019, 6:26 a.m.

C++ - Test 001. The first program and data types

  • Result:80points,
  • Rating points4
July 21, 2019, 11:33 p.m.
Vlad Dolgov

C++ - Test 001. The first program and data types

  • Result:40points,
  • Rating points-8
Last comments
July 21, 2019, 6:03 a.m.
Evgenij Legotskoj

да, наверное, 32-х разрядную поддержку уже давно поа было выкинуть. К слову, у вас много проектов под Android? Часто много где вижу вопросы о том, пишет ли кто-то вообще на Qt под мобильные сист…
July 20, 2019, 2:41 p.m.
Andrej Jankovich

Очень полезная информация, увы уже выкинул поддержку 32 битных бедняг.
July 20, 2019, 9:31 a.m.

Вот так qDebug()<<"position:"<<event->scenePos();
July 20, 2019, 8:49 a.m.

Добрый день. Как можно узнать координату на графической сцене при отпускании клавиши мыши?
Now discuss on the forum
July 22, 2019, 8:41 a.m.

Вот только что нашел в инете, у человека такая же ошибка. Вроде бы таже самая проблема https://stackoverflow.com/questions/37633709/how-to-create-qtquick-window-outside-the-main-thread…
July 22, 2019, 3:58 a.m.
Evgenij Legotskoj

Добрый день! Нужен совет сообщества по разработке функционала проверки орфографии. Одна из идей - добавить проверку орфографии при наборе текста статей. Полагаю, что наиболее аде…
July 22, 2019, 3:01 a.m.
Evgenij Legotskoj

Возможно, если при сохранении файла установить права доступа на файл. Что-то такое должно быть у QFile
July 22, 2019, 3:01 a.m.
Evgenij Legotskoj

Я отрисовываю квадрат в его локальной системе координат от верхнего левого угла (-30,-30) до его правого нижнего угла (30,30). Поэтому мне нужно указать размеры объекта через boundingRect()…
July 20, 2019, 11:04 a.m.

Так и с ресурсами работает QImage image(":/Images/Images/1.png");
Looking for a Job?
5,000.00 руб. - 15,000.00 руб.
Moskovskiy, Moscow, Russia
25,000.00 руб. - 30,000.00 руб.
Разработчик Qt/C++
Barnaul, Altai Krai, Russia

For registered users on the site there is a minimum amount of advertising

Join us
© EVILEG 2015-2019
Recommend hosting TIMEWEB