3 ms·
memset(key,sizeof(char),32); Note that you are not clearing 32 bytes with NUL (byte value 0). You are clearing 32 bytes with byte value 1 == (int)(sizeof(char)
by wolf550e 12y ago
memset(key,sizeof(char),32);
Note that you are not clearing 32 bytes with NUL (byte value 0). You are clearing 32 bytes with byte value 1 == (int)(sizeof(char).
That's why memset that works 8 bytes at a time fills memory with 72340172838076673 == 0x0101010101010101
http://linux.die.net/man/3/memset http://linux.die.net/man/3/memset