# OpenSSL encrypted text length

OpenSSL block ciphers return length of the text as output of the encryption (envelope_seal()), and If I have to send the length over network, I append the length with the ciphertext as I can transmit only one field and envelope_open() needs the length of the ciphertext. Is there any other way that I can calculate the length of the ciphertext, which contains null terminated characters, on the receiving side?

• I don't know what kind of function you are currently using to decode. What about the len in len = BIO_read(bio, *buffer, strlen(b64message)); ? – Maarten Bodewes Feb 8 '15 at 10:57