As part of a C++ programming assignment I am writing code that has different layers of encryption for a string. (of course, I can just import an AES library but I am trying to do my own things for learning sake)
For one of the layers of encryption, I would like to scramble and un-scramble orders of characters in a string using a key.
However, I can not think of a good way to implement this in c++.
For example, a five letter word should have (5!=120 combinations of ways to scramble it?) I could hard code one of the way to do this. But the security would only be in the secrecy of the algorithm, not the key.
Example of one possibility of scrambling a 5 letter word Is there a good way to implement a way to scramble and unscramble words where the combination that is implemented is based on a key?
Aucun commentaire:
Enregistrer un commentaire