Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $key = $_GET['key'];
- $recipient = htmlspecialchars($_GET['recipient']);
- $subject = htmlspecialchars($_GET['subject']);
- $body = htmlspecialchars($_GET['body']);
- $email = "<p class='recipient'>{$recipient}</p><p class='subject'>{$subject}</p><p class='message'>{$body}</p>";
- $keyLength = strlen($key);
- $encrypted = '';
- for ($i = 0; $i < strlen($email); $i++) {
- $emailCharCode = ord($email[$i]);
- $keyCharCode = ord($key[($i % $keyLength)]);
- $encrypted .= '|' . dechex($emailCharCode * $keyCharCode);
- }
- echo $encrypted . '|';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement