diff --git a/phpseclib/Crypt/Twofish.php b/phpseclib/Crypt/Twofish.php index 3c1f6dcb..9193e650 100644 --- a/phpseclib/Crypt/Twofish.php +++ b/phpseclib/Crypt/Twofish.php @@ -402,7 +402,7 @@ class Twofish extends BlockCipher case 256: break; default: - throw new \LengthException('Key of size ' . strlen($key) . ' not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported'); + throw new \LengthException('Key of size ' . $length . ' not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported'); } parent::setKeyLength($length);