The website you've got this code from is not giving you high-quality C. There's several defects in their code --
sizeof(char)
, missing consts, needless casts, casting the value returned from
malloc
, use of
int
instead of
size_t
. Even the "expected ciphertext" is wrong, as the ciphertext is not unicode (it's bytes). Maybe none of things is an absolute mistake, it's just that it's not good C as is practiced by experienced C-programmers. —
Paul Hankin just now