<?php
/* Коды для замены букв */
'а' => '1',
'б' => '2',
'в' => '3',
'г' => '4',
'д' => '5',
'е' => '6',
'ё' => '7',
'ж' => '8',
'з' => '9',
'и' => '0',
'й' => '#',
'к' => '-',
'л' => '*',
'м' => '(',
'н' => ')',
'о' => '\$',
'п' => '@',
'р' => 'CCC',
'с' => 'BBB',
'т' => 'AAA',
'у' => '~',
'ф' => '`',
'х' => '<',
'ц' => '>',
'ч' => ':',
'ш' => '%',
'щ' => ';',
'ъ' => '№',
'ы' => 'EEE',
'ь' => '!',
'э' => 'DDD',
'ю' => '&',
'я' => '^'
);
$text = 'нас предали. явка провалена.';
$cipher = strtr($text, $code); $newCipher = '(EEE BBB(\$86( CCC1BBB%0`CCC\$31AAA! 31%6 BBB\$\$2;6)06.';
$decrypt = strtr($newCipher, $newCode); echo "Оригинал: {$text}\nШифровка: {$cipher}\n";
echo "Оригинал: {$newCipher}\nРасшифровка: {$decrypt}\n";
PD9waHAKCmVycm9yX3JlcG9ydGluZygtMSk7CgovKiDQmtC+0LTRiyDQtNC70Y8g0LfQsNC80LXQvdGLINCx0YPQutCyICovCiRjb2RlID0gYXJyYXkoCiAgICAn0LAnCT0+CScxJywKICAgICfQsScJPT4JJzInLAogICAgJ9CyJwk9PgknMycsCiAgICAn0LMnCT0+CSc0JywKICAgICfQtCcJPT4JJzUnLAogICAgJ9C1Jwk9PgknNicsCiAgICAn0ZEnCT0+CSc3JywKICAgICfQticJPT4JJzgnLAogICAgJ9C3Jwk9PgknOScsCiAgICAn0LgnCT0+CScwJywKICAgICfQuScJPT4JJyMnLAogICAgJ9C6JyA9PiAnLScsCiAgICAn0LsnID0+ICcqJywKICAgICfQvCcgPT4gJygnLAogICAgJ9C9JyA9PiAnKScsCiAgICAn0L4nID0+ICdcJCcsCiAgICAn0L8nID0+ICdAJywKICAgICfRgCcgPT4gJ0NDQycsCiAgICAn0YEnID0+ICdCQkInLAogICAgJ9GCJyA9PiAnQUFBJywKICAgICfRgycgPT4gJ34nLA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