when i trying to use on php(also gcc) like this:
$td = mcrypt_module_open('rijndael-128', '', 'cbc', '');
mcrypt_enc_get_key_size($td) function always return 32.
If user set to 128, should return 16.
32 is only returning on 256bit mode.
afaik, the 128 in 'rijndael-128' isn't referring to the key size but rather, the block size. Rijndael, unlike AES, has a variable block size, and mcrypt has chosen to implement that fact by creating a new module for each block size.
mcrypt_enc_get_key_size is returning 32 because 32 is the maximum key size for both Rijndael and AES. mcrypt supports other key sizes, afaik, but that fact would be hard to represent with mcrypt_enc_get_key_size unless it started returning arrays or something.