You are viewing a single comment's thread. Return to all comments →
Perl:
sub encryption { my $s = shift; my @parts; my $res; my $g = 0; $s =~ s/\s*//gm; my $floor = floor(sqrt(length($s))); my $ceeling = ceil(sqrt(length($s))); for (my $i = 0; $i < length($s); $i = $i + $ceeling ) { push(@parts, substr($s, $i, $ceeling)) } while ($g < $ceeling) { for (my $j = 0; $j < scalar(@parts); $j++ ) { $res .= substr($parts[$j], $g, 1); } $res .= " "; $g++; } return $res; }
Seems like cookies are disabled on this browser, please enable them to open this website
Encryption
You are viewing a single comment's thread. Return to all comments →
Perl: