The decoded base64 data might contain PEM with/without/with multiple '\0' at the end of the string. We do not want to drag this through our code so ensure the length matches the string length including '\0'