base32 and base64 no longer require padding when decoding.
Previously an error was given for non padded encoded data.
+ base32 and base64 have improved detection of corrupted encodings.
+ Previously encodings with non zero padding bits were accepted.
+
basenc --base16 -d now supports lower case hexadecimal characters.
Previously an error was given for lower case hex digits.
push @Tests, (
['baddecode', '--decode', {IN=>'a'}, {OUT=>""},
{ERR_SUBST => 's/.*: invalid input//'}, {ERR => "\n"}, {EXIT => 1}],
- ['paddecode2', '--decode', {IN=>'ab'}, {OUT=>"i"}],
- ['paddecode3', '--decode', {IN=>'Zzz'}, {OUT=>"g<"}],
+ ['paddecode2', '--decode', {IN=>'aQ'}, {OUT=>"i"}],
+ ['paddecode3', '--decode', {IN=>'Zzw'}, {OUT=>"g<"}],
['baddecode4', '--decode', {IN=>'Zz='}, {OUT=>"g"},
{ERR_SUBST => 's/.*: invalid input//'}, {ERR => "\n"}, {EXIT => 1}],
['baddecode5', '--decode', {IN=>'Z==='}, {OUT=>""},
+ {ERR_SUBST => 's/.*: invalid input//'}, {ERR => "\n"}, {EXIT => 1}],
+ ['baddecode6', '--decode', {IN=>'SB=='}, {OUT=>"H"},
+ {ERR_SUBST => 's/.*: invalid input//'}, {ERR => "\n"}, {EXIT => 1}],
+ ['baddecode7', '--decode', {IN=>'SGVsbG9='}, {OUT=>"Hello"},
{ERR_SUBST => 's/.*: invalid input//'}, {ERR => "\n"}, {EXIT => 1}]
);
}