-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTestingScript.php
More file actions
24 lines (19 loc) · 875 Bytes
/
TestingScript.php
File metadata and controls
24 lines (19 loc) · 875 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php
require 'EncryptionTask.php';
$textToEncryptTest1 = "hello world!";
$encyptionKeyTest1 = "thekey";
$textToEncryptTest2 = "testing98765[]~";
$encyptionKeyTest2 = "test";
$textToEncryptTest3 = "Hello, How are you today?";
$encyptionKeyTest3 = "MORNING";
test($textToEncryptTest1,$encyptionKeyTest1);
test($textToEncryptTest2,$encyptionKeyTest2);
test($textToEncryptTest3,$encyptionKeyTest3);
function test($textToEncrypt,$encyptionKey){
$textEncrypted = generateEncryptedText($textToEncrypt,$encyptionKey);
$textDecrypted = decryptText($textEncrypted,$encyptionKey);
echo "Input Text:".$textToEncrypt." Encyption Key:".$encyptionKey."\r\n";
echo "Encrypted Text:".$textEncrypted." Decrypted Text:".$textDecrypted;
echo " || \r\n\r\n";
}
?>