Delete unused encode_base64 function

This commit is contained in:
Richard Hansen 2024-08-02 03:29:02 -04:00
parent 2e59e86df6
commit 1bdd65e46e

View file

@ -2544,25 +2544,6 @@ sub check_value {
}
return $value;
}
######################################################################
## encode_base64 - from MIME::Base64
######################################################################
sub encode_base64 ($;$) {
my $res = '';
my $eol = $_[1];
$eol = "\n" unless defined $eol;
pos($_[0]) = 0; # ensure start at the beginning
while ($_[0] =~ /(.{1,45})/gs) {
$res .= substr(pack('u', $1), 1);
chop($res);
}
$res =~ tr|` -_|AA-Za-z0-9+/|; # `# help emacs
# fix padding at the end
my $padding = (3 - length($_[0]) % 3) % 3;
$res =~ s/.{$padding}$/'=' x $padding/e if $padding;
$res;
}
######################################################################
## load_sha1_support