I'm encryption "sifrelenecek" string with Delphi using AES 128 ECB using key as "KRPTTT101103" and it gives me "FBE4A4405D6C1B54503D9B213E41AE56", i'm checking with http://aes.online-domain-tools.com/ and it's correct. I'm trying to create same encryption with php using this function ;
function sifrele($str, $key){
$block = mcrypt_get_block_size('rijndael_128', 'ecb');
$pad = $block - (strlen($str) % $block);
$str .= str_repeat(chr($pad), $pad);
return base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $key, $str, MCRYPT_MODE_ECB)); }
print sifrele("sifrelenecek","KRPTTT101103")
but php gives me the result as "+wL2yf+72thixicjw0duQA==", how can i encrypt in Delphi and Decrypt in php or the opposit ?
Searched on the web and found so many functions but not any of those functions results are the same with Delphi or http://aes.online-domain-tools.com/
Thanks in advance.