From 1bdd65e46e26396c0b7f82569f2835ad0649f570 Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Fri, 2 Aug 2024 03:29:02 -0400 Subject: [PATCH] Delete unused `encode_base64` function --- ddclient.in | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/ddclient.in b/ddclient.in index 76e2310..71befaf 100755 --- a/ddclient.in +++ b/ddclient.in @@ -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