EvilZone
Programming and Scripting => C - C++ => : EpicOut November 24, 2014, 02:45:51 PM
-
Hi today i'm sharing with you my vernam's implementation i made in C, i hope you will enjoy it, if you have any questions about the code or whatever related, feel free to ask, go on :-)
http://pastebin.com/iwLuetvU
-
It looks cut off at the bottom
-
it isn't :p
-
it isn't :p
then you forgot to close main, or I'm missing something. Care to explain?
-
Eaxtly i forgot to close my main but otherwise this is not cut off ^^
-
Eaxtly i forgot to close my main but otherwise this is not cut off ^^
That doesn't make any sense. You've just proved that it is cut off. The source is not complete, and that's the fact. You missed a closing bracket -- it's cut off.
You shouldn't be seeding the rng from a function which sets the random values to a pre-allocated buffer like that. You've defeated the whole point of 'randomness' if you intend for this function to be called multiple times (and it looks like it *should* semantically be set up to do that).
In C you aren't required to cast the return from functions like malloc() which return void*.