От Base64encoder Docs, подпись конструктора
Base64Encoder (BufferedTransformation *attachment=NULL, bool insertLineBreaks=true, int maxLineLength=72)
Таким образом, вы по умолчанию получаете разрывы строки в своей закодированной строке. Чтобы избежать этого, просто сделайте:
CryptoPP::StringSource ss(
in,
true,
new CryptoPP::Base64Encoder(
new CryptoPP::StringSink(encoded),
false
)
);