You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tdepim/libkmime/tests/gen_decode_map.pl

18 lines
449 B

#!/usr/bin/perl -w
use strict;
my @encodingMap = ( 'A' .. 'Z', 'a' .. 'z', '0' .. '9', '+', '/' );
my @decodingMap = (64) x 128;
my $len = scalar @encodingMap;
for ( my $i = 0 ; $i < $len ; $i++ ) {
my $value = ord $encodingMap[$i];
$decodingMap[$value] = $i;
}
for ( my $i = 0 ; $i < 128 ; $i += 16 ) {
print " ", join( ", ", @decodingMap[$i..($i+7)] ), ", ",
join( ", ", @decodingMap[($i+8)..($i+15)] ), ",\n";
}