ROT47

Tablica przekształceń
znak rot47 znak rot47
! P " Q
# R $ S
% T & U
' V ( W
) X * Y
+ Z , [
- \ . ]
/ ^ 0 _
1 ` 2 a
3 b 4 c
5 d 6 e
7 f 8 g
9 h : i
; j < k
= l > m
? n @ o
A p B q
C r D s
E t F u
G v H w
I x J y
K z L {
M | N }
O ~ P !
Q " R #
S $ T %
U & V '
W ( X )
Y * Z +
[ , \ -
] . ^ /
_ 0 ` 1
a 2 b 3
c 4 d 5
e 6 f 7
g 8 h 9
i : j ;
k < l =
m > n ?
o @ p A
q B r C
s D t E
u F v G
w H x I
y J z K
{ L | M
} N ~ O

ROT47kodowanie przesuwające, zamieniające każdy znak ASCII z przedziału 33-126 na znak znajdujący się 47 pozycji dalej, ale nie dalej niż do 126 pozycji. Podobnie jak ROT13 jest on samoodwracalny, tzn:

Implementacja

Kod przekształcenia rot47 napisany w Perlu:

perl -pe 'tr/\x21-\x7e/\x50-\x7e\x21-\x4f/'

Kod rot47 w PHP:

strtr($str, '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~', 
            'PQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNO');

oraz w systemach uniksowych:

tr '\!-~' 'P-~\!-O'

Przykład

Przykładowy tekst:

To zdanie jest zakodowane.

po zakodowaniu ROT47 wygląda następująco:

%@ K52?:6 ;6DE K2<@5@H2?6]

Content Disclaimer

Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.

  1. The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
  2. There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
  3. It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
  4. Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.