C++ Create and Implement a Crypto class from the UML diagram in Figure 5.4. Figu
ID: 3737937 • Letter: C
Question
C++
Create and Implement a Crypto class from the UML diagram in Figure 5.4.
Figure 5.4. Crypto Class
m_OpSequence is a QString consisting of the characters 'p' and 's' that represent permute() and shift(). The encrypt() function applies those functions to the given string in the order that they appear in the m_OpSequence string.
Example 5.28 contains some code to test your class.
Example 5.28. src/functions/crypto-client.cpp
C++
Crypto m Key: ushort m_OpSequence : QString m_CharSetSize: ushort m Perm: QVector + Crypto(key: ushort, opseq : QString, charsiz: ushort) +encrypt(str const QString&): QString + decrypt(str const QString&): QString shift (str: const QString&) : QString - unshift(str: const QString&) : QString - permute(str const QString&) : QString unpermute(str const QString&): QString - limitedRand(max : int): int - randomPerm(n: int): QVectorExplanation / Answer
// Crypto class:-
// Client to test your class
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.