The encrypt function exposed returns type size_t, but the documentation specifies that it might return -1 if the operations failed. This will just result in returning SIZE_MAX which means a successful operation returning the maximum size is indistinguishable from failure.
Is there a reason you wanted to avoid an extra out-param for the resulting cipher-text size, freeing the return value to be something like PORTABLE8439_{OK, ERROR} instead?
The
encryptfunction exposed returns typesize_t, but the documentation specifies that it might return-1if the operations failed. This will just result in returningSIZE_MAXwhich means a successful operation returning the maximum size is indistinguishable from failure.Is there a reason you wanted to avoid an extra out-param for the resulting cipher-text size, freeing the return value to be something like
PORTABLE8439_{OK, ERROR}instead?