Hello, > Hello all, > Could someone please clarify this for me and correct me if I am wrong > > I am using AES_encrypt and AES_decrypt which apparently only work on > chunks of 16 bytes of data, my goal is to create my own functions to > encrypt strings, so I am chunking the strings into 16 bytes and feeding > them one at a time into AES_encrypt then taking the output and using > strncat to put it into a buffer. Once done looping though all of the > chunks I then return the buffer. Use memcpy() with some pointer (or something like this) because output from AES_[ed]crypt() is not string but 16 bytes of binary data that can have '\0' chars inside. By "one by one" i guess that you use ECB mode which should be avoided. Look at crypto/aes/aes_cbc.c for example implementation of CBC mode. And one warning: this implementation does not remove padding when decryption is used.
Best regards, -- Marek Marcola <[EMAIL PROTECTED]> ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]