<?php
'а' => '1',
'б' => '2',
'в' => '3',
'г' => '4',
'д' => '5',
'е' => '6',
'ё' => '7',
'ж' => '8',
'з' => '9',
'и' => '10',
'й' => '11',
'к' => '12',
'л' => '13',
'м' => '14',
'н' => '15',
'о' => '16',
'п' => '17',
'р' => '18',
'с' => '19',
'т' => '20',
'у' => '21',
'ф' => '22',
'х' => '23',
'ц' => '24',
'ч' => '25',
'ш' => '26',
'щ' => '27',
'ъ' => '28',
'ь' => '29',
'ы' => '30',
'э' => '31',
'ю' => '32',
'я' => '33',
'.' => '#',
',' => '@',
);
$text = 'нас предали. явка провалена';
$cipher = strtr ($text, $code); echo "Оригинал: {$text}\nШифровка: {$cipher}\n" ;
$decipher = strtr ($cipher, $flipped);
echo "Расшифровка: {$decipher}\n";
PD9waHAKCmVycm9yX3JlcG9ydGluZygtMSk7CgoKJGNvZGUgPSBhcnJheSgKICAgICfQsCcJPT4JJzEnLAogICAgJ9CxJwk9PgknMicsCiAgICAn0LInCT0+CSczJywKICAgICfQsycJPT4JJzQnLAogICAgJ9C0Jwk9PgknNScsCiAgICAn0LUnCT0+CSc2JywKICAgICfRkScJPT4JJzcnLAogICAgJ9C2Jwk9PgknOCcsCiAgICAn0LcnCT0+CSc5JywKICAgICfQuCcJPT4JJzEwJywKICAgICfQuScJPT4JJzExJywKICAgICfQuicJPT4JJzEyJywKICAgICfQuycJPT4JJzEzJywKICAgICfQvCcJPT4JJzE0JywKICAgICfQvScJPT4JJzE1JywKICAgICfQvicJPT4JJzE2JywKICAgICfQvycJPT4JJzE3JywKICAgICfRgCcJPT4JJzE4JywKICAgICfRgScJPT4JJzE5JywKICAgICfRgicJPT4JJzIwJywKICAgICfRgycJPT4JJzIxJywKICAgICfRhCcJPT4JJzIyJywKICAgICfRhScJPT4JJzIzJywKICAgICfRhicJPT4JJzI0JywKICAgICfRhycJPT4JJzI1JywKICAgICfRiCcJPT4JJzI2JywKICAgICfRiScJPT4JJzI3JywKICAgICfRiicJPT4JJzI4JywKICAgICfRjCcJPT4JJzI5JywKICAgICfRiycJPT4JJzMwJywKICAgICfRjScJPT4JJzMxJywKICAgICfRjicJPT4JJzMyJywKICAgICfRjycJPT4JJzMzJywKICAgICcuJwk9PgknIycsCiAgICAnLCcJPT4JJ0AnLAogICAgCik7CiR0ZXh0ID0gJ9C90LDRgSDQv9GA0LXQtNCw0LvQuC4g0Y/QstC60LAg0L/RgNC+0LLQsNC70LXQvdCwJzsKJGNpcGhlciA9IHN0cnRyICgkdGV4dCwgJGNvZGUpOwplY2hvICLQntGA0LjQs9C40L3QsNC7OiB7JHRleHR9XG7QqNC40YTRgNC+0LLQutCwOiB7JGNpcGhlcn1cbiIgOwoKJGZsaXBwZWQgPSBhcnJheV9mbGlwKCRjb2RlKTsKJGRlY2lwaGVyID0gc3RydHIgKCRjaXBoZXIsICRmbGlwcGVkKTsKCmVjaG8gItCg0LDRgdGI0LjRhNGA0L7QstC60LA6IHskZGVjaXBoZXJ9XG4iOwoK