init commit

This commit is contained in:
2024-03-19 01:05:51 +08:00
commit 199bbf2628
393 changed files with 34883 additions and 0 deletions

View File

@ -0,0 +1,69 @@
#include <iostream>
using namespace std;
class text
{
public:
virtual void display() = 0;
};
class original : public text
{
public:
void display()
{
cout << "简单加密\n";
}
};
class encrypt : public text
{
protected:
text *t;
public:
encrypt(text *t)
{
this->t = t;
}
void display()
{
t->display();
}
};
class rsa : public encrypt
{
public:
rsa(text *t) : encrypt(t)
{
}
void display()
{
encrypt::display();
cout << "rsa加密\n";
}
};
class bit : public encrypt
{
public:
bit(text *t) : encrypt(t)
{
}
void display()
{
encrypt::display();
cout << "位加密\n";
}
};
int main()
{
text *a, *b, *c;
a = new original();
b = new rsa(a);
c = new bit(b);
c->display();
return 0;
}