Just in time processing on a character stream: Difference between revisions
Content added Content deleted
Thundergnat (talk | contribs) (Rename Perl 6 -> Raku, alphabetize, minor clean-up) |
Thundergnat (talk | contribs) (→{{header|Raku}}: Fix Perl 6 -> Raku, regenerate solution as it is keyed off of name) |
||
Line 769: | Line 769: | ||
=={{header|Perl}}== |
=={{header|Perl}}== |
||
{{trans| |
{{trans|Raku}} |
||
{{libheader|ntheory}} |
{{libheader|ntheory}} |
||
<lang perl>use strict; |
<lang perl>use strict; |
||
Line 1,022: | Line 1,022: | ||
Set srand to set the encode / decode "key". |
Set srand to set the encode / decode "key". |
||
Need to use the same "key" and same implementation |
Need to use the same "key" and same implementation |
||
of |
of Raku to encode / decode. Gain "security" by |
||
exchanging "keys" by a second channel. Default |
exchanging "keys" by a second channel. Default |
||
"key" is " |
"key" is "Raku" |
||
] |
] |
||
unit sub MAIN ($key = ' |
unit sub MAIN ($key = 'Raku'); |
||
srand $key.comb(/<.alnum>/).join.parse-base(36) % 2**63; |
srand $key.comb(/<.alnum>/).join.parse-base(36) % 2**63; |
||
Line 1,093: | Line 1,093: | ||
== Encoded: == |
== Encoded: == |
||
Qv26e26q1Gi2Ww5SiQr26h3Mk1GbQy52e1Gg6Ib52kQfQk26n26l26cQm26q |
|||
26j52d6Ie1Ge4Cd26po1GdsQa3Ms52piQd4Cn3Md2Wcf1GtciQz1GwQb5Si2 |
|||
2Wk26vwme52qy6Ia1GuQfa3MbQxtd26aa3MvQu2Wuat26p2Wbe2Wc1Ga26g2 |
|||
WnQlQmQjQv1GmQra2Wt4Cpc1Gysatu26va1Gq52x4Cp1Gv4CeQv1Gb1Gp4Co |
|||
6h26pQha26h4Cf26jrz7Yz3MaA4h2WxFWf52zyg2WrQn2Wj26pQyQy78x1Gd |
|||
6IbaQyAUmd26a7Yw3Mh2Wu26v1GfQsQwbQpn26z1Gi1Gl1GmQb1Gfs26v4Ce |
|||
dk4Cu26k26qaaap26j26xqQf7Yr8Op3Me3Me5Sv1Ge1Gt2WxlQz5Si1GeQg4 |
|||
Qy2Wm78xaaa4Cj26x6If3Msqu2Wx2Wku1Gh52ydQh3Mb78rll1GvcQap5Sgy |
|||
CjQc5Sb2WbQo1GycQr1Gm1Gy1GsQei3MrQsai1Gq2WnQdt2Wj1Gff1Gg26le |
|||
Qm26s1Gh26clj1Gm1GzA4y26bat1Gdk1Gs1Gpm1GlQs7Ys52dQw1Giv5Se5S |
|||
2Wd1Go9Ek1Gm9Eh2Wb1Gd52h2WdQae4Chu3MeQd1Gg1Gw4CqbEGh52u2Wr1G |
|||
u3Mb1Gucn4Cq26h26pQq2Wh5Sh7Yi8OrpQl26p26i3MqtQiQhQi4Ckb3Mi |
|||
t52xhvQmx |
|||
== Decoded: == |
== Decoded: == |