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

C++

Create and Implement a Crypto class from the UML diagram in Figure 5.4.

Figure 5.4. Crypto Class

C++ Create and Implement a Crypto class from the UML diagram in

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

#include #include "crypto.h" int main() { QTextStream cout(stdout); QString str1 ("asdfghjkl;QWERTYUIOP{}}|123456&*()_+zxcvnm,,, ./?"), str2; cout  

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

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!