Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

In C++ Please. Implement a Crypto class that encapsulates the functions from the

ID: 3733825 • Letter: I

Question

In C++ Please.

Implement a Crypto class that encapsulates the functions from the preceding exercises. You can use the UML diagram in Figure 5.4 to get you started.

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.

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): QVector

Explanation / Answer

// Crypto class

// Client to test your class