<?php
/* Коды для замены букв */
'а' => '1',
'б' => '2',
'в' => '3',
'г' => '4',
'д' => '5',
'е' => '6',
'ё' => '7',
'ж' => '8',
'з' => '9',
'и' => '0',
'й' => '#',
'к' => 'a',
'л' => 'b',
'м' => 'c',
'н' => 'd',
'о' => 'e',
'п' => 'f',
'р' => 'g',
'с' => 'h',
'т' => 'i',
'у' => 'j',
'ф' => 'k',
'х' => 'l',
'ц' => 'm',
'ч' => 'n',
'ш' => 'o',
'щ' => 'p',
'ъ' => 'q',
'ы' => 'r',
'ь' => 's',
'э' => 't',
'ю' => 'u',
'я' => 'v'
);
$text = 'нас предали. явка провалена.';
$cipher = strtr($text, $code); $uncip2 = strtr($cipher, $uncip1); echo "Оригинал: {$text}\nШифровка: {$cipher}\nРасшифровка: {$uncip2}\n";
PD9waHAKCmVycm9yX3JlcG9ydGluZygtMSk7CgovKiDQmtC+0LTRiyDQtNC70Y8g0LfQsNC80LXQvdGLINCx0YPQutCyICovCiRjb2RlID0gYXJyYXkoCiAgICAn0LAnCT0+CScxJywKICAgICfQsScJPT4JJzInLAogICAgJ9CyJwk9PgknMycsCiAgICAn0LMnCT0+CSc0JywKICAgICfQtCcJPT4JJzUnLAogICAgJ9C1Jwk9PgknNicsCiAgICAn0ZEnCT0+CSc3JywKICAgICfQticJPT4JJzgnLAogICAgJ9C3Jwk9PgknOScsCiAgICAn0LgnCT0+CScwJywKICAgICfQuScJPT4JJyMnLAogICAgJ9C6JyA9PgknYScsCiAgICAn0LsnID0+IAknYicsCiAgICAn0LwnID0+CSdjJywKICAgICfQvScgPT4JJ2QnLAogICAgJ9C+JyA9PgknZScsCiAgICAn0L8nID0+CSdmJywKICAgICfRgCcgPT4JJ2cnLAogICAgJ9GBJyA9PgknaCcsCiAgICAn0YInID0+CSdpJywKICAgICfRgycgPT4JJ2onLAogICAgJ9GEJyA9PgknaycsCiAgICAn0YUnID0+CSdsJywKICAgICfRhicgPT4JJ20nLAogICAgJ9GHJyA9PgknbicsCiAgICAn0YgnID0+CSdvJywKICAgICfRiScgPT4JJ3AnLAogICAgJ9GKJyA9PgkncScsCiAgICAn0YsnID0+CSdyJywKICAgICfRjCcgPT4JJ3MnLAogICAgJ9GNJyA9PgkndCcsCiAgICAn0Y4nID0+CSd1JywKICAgICfRjycgPT4JJ3YnCiAgICApOwoKJHRleHQgPSAn0L3QsNGBINC/0YDQtdC00LDQu9C4LiDRj9Cy0LrQsCDQv9GA0L7QstCw0LvQtdC90LAuJzsKJGNpcGhlciA9IHN0cnRyKCR0ZXh0LCAkY29kZSk7CiR1bmNpcDEgPSBhcnJheV9mbGlwKCRjb2RlKTsKJHVuY2lwMiA9IHN0cnRyKCRjaXBoZXIsICR1bmNpcDEpOwplY2hvICLQntGA0LjQs9C40L3QsNC7OiB7JHRleHR9XG7QqNC40YTRgNC+0LLQutCwOiB7JGNpcGhlcn1cbtCg0LDRgdGI0LjRhNGA0L7QstC60LA6IHskdW5jaXAyfVxuIjsKCgo=