Closed sim590 closed 6 years ago
Not tested but code looks good :-)
@aberaud Thanks for your input! We'll see if tests pass after #9 is merged :smile_cat:
Actually, they won't pass that's for sure. :wink: I will push new tests so that everything pass on this branch.
A new class
Cipher
has been introduced in order to capture the common interface on all different ciphers. The two following functions describe the interface of a cipher:The above is combined with two structures that are used to pass parameters depending on the cipher used.
In each case, a cipher will process the (cipher/plain)text using the same functions which are implemented differently for each particular ciphers.
N.B: Since the new instruction
std::variant
is used, the program now depends onc++17
.