Delete unused encode_base64
function
This commit is contained in:
parent
2e59e86df6
commit
1bdd65e46e
1 changed files with 0 additions and 19 deletions
19
ddclient.in
19
ddclient.in
|
@ -2544,25 +2544,6 @@ sub check_value {
|
||||||
}
|
}
|
||||||
return $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
|
## load_sha1_support
|
||||||
|
|
Loading…
Reference in a new issue