diff --git a/phpseclib/Crypt/Rijndael.php b/phpseclib/Crypt/Rijndael.php index a123c675..6d4b21ac 100644 --- a/phpseclib/Crypt/Rijndael.php +++ b/phpseclib/Crypt/Rijndael.php @@ -628,7 +628,7 @@ class Crypt_Rijndael { } } - $this->setKey($key); + $this->setKey(substr($key, 0, $this->key_size)); } /**