Aleksandr Panjushkin

eska2000

  • 1
  • 0
June 14, 2019, 5:10 a.m.

Qt

RSA, Qt, шифрование в qt, private key, asynchronous encryption, ge, публичный и приватные ключи, AES, cryptography, crypto, QuasarApp, Public key, Qt-Sekret

Introduction

In this article there is a way how to organize message encryption, as well as use RSA (public and private keys) algorithms without libraries similar to OpenSSL, QCA or LibSodium.

Feb. 26, 2019, 4:22 a.m.

C++

SFINAE, C++17, template

There was a problem: "write the second implementation of the template function", in which the same arguments are passed. That is, the signature of both functions completely coincides. The difference is that, as an argument, the std::vector containers and the std::map containers can be passed to the function. And depending on whether std::vector is or std::map, this or that implementation should be selected.

In this case, the SFINAE rule will be used, which states: If the final types of arguments cannot be calculated (to perform substitution of template parameters) of an overloaded template function, the compiler does not throw an error, but searches for another suitable overload. The error will be in three cases:

  • No suitable overload was found.
  • Several such overloads were found, and C ++ cannot decide which one to take.
  • The overload was found, it turned out to be a template, and an error occurred when instantiating the template.

Our case will be the second. There are two overload template functions.

Looking for a Job?
14,000.00 руб. - 40,000.00 руб.
Разработчик Qt
Annino, Moscow Oblast, Russia
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