in reply to crypto with core modules only

Here is a good one, which frodo72, now known as polettix showed me in perl encryptions keys vs. c. I was trying to find out how to make c's RC4 compatible with perl's RC4. Anyways, this code is pretty good for your purposes, it uses no modules, and uses a key.
#!/usr/bin/perl -0777 -- # by frodo72 of perlmonks # $0 key infile > outfile # symmetric works both ways use strict; use warnings; my @k = map { ord($_) } split //, shift; my ( @s, $x, $y ); $y = 0; for ( my @t = @s = 0 .. 255 ) { $y = ( $k[ $_ % @k ] + $s[ $x = $_ ] + $y ) % 256; &S; } $x = $y = 0; for ( unpack( 'C*', <> ) ) { $x++; $y = ( $s[ $x %= 256 ] + $y ) % 256; &S; print pack( 'C', $_ ^= $s[ ( $s[$x] + $s[$y] ) % 256 ] ); } sub S { @s[ $x, $y ] = @s[ $y, $x ] }

I'm not really a human, but I play one on earth. ..... an animated JAPH