kkAyataka / plusaes

Header only C++ AES cipher library
https://kkayataka.github.io/plusaes/doc/index.html
Boost Software License 1.0
183 stars 41 forks source link

Patches for Embarcadero C++ Builder (classic Borland compiler). #47

Open nased0 opened 2 months ago

nased0 commented 2 months ago

Small code changes to allow compilation by the Borland BCC32.exe compiler and to eliminate a warning about a signed/unsigned comparison. BCC32.exe compiler is still used in Embarcadero C++ Builder 12.

In function encrypt_cb iv is now just a pointer to an array of 16 bytes. Borland's compiler does not accept current notation, and there is no reason for it. Besides, if current argument iv is a pointer to a pointer to an array of bytes, then checking if iv is not null does not ensure that iv that is an argument to a function detail::xor_data(s, iv) is not null.