#include #include #include using namespace std; int main() { string plainText = "hello World"; string encrypted; string salt1 = "ab"; string salt2 = "cd"; string salt3 = "$6$helloworld"; cout << "crypting " << plainText << " with salt " << salt1 << endl; encrypted = crypt(plainText.c_str(), salt1.c_str()); cout << encrypted << endl; cout << "crypting " << plainText << " with salt " << salt2 << endl; encrypted = crypt(plainText.c_str(), salt2.c_str()); cout << encrypted << endl; cout << "crypting " << plainText << " with salt " << encrypted << endl; encrypted = crypt(plainText.c_str(), encrypted.c_str()); cout << encrypted << endl; cout << "crypting " << plainText << " with salt " << salt3 << endl; encrypted = crypt(plainText.c_str(), salt3.c_str()); cout << encrypted << endl; return 0; }