Subject: | Base64 encoding introduces white spaces |
By default encode_base64 adds a white space every 76 characters, and a
line break at the end of the string.
Replace
my $sig = encode_base64($private_key->sign($data));
By
my $sig = encode_base64($private_key->sign($data), '');