use $cipher->key_length

starting with phpseclib 2.0.1, `key_size` was renamed to `key_length`
This commit is contained in:
Daniel Ruf 2016-03-14 12:10:17 +01:00
parent cefaef242d
commit 08ae2c57d1

View File

@ -170,7 +170,7 @@ class OpenPGP_Crypt_Symmetric {
break;
}
if(!$cipher) return array(NULL, NULL, NULL); // Unsupported cipher
if(!isset($key_bytes)) $key_bytes = $cipher->key_size;
if(!isset($key_bytes)) $key_bytes = isset($cipher->key_size)?$cipher->key_size:$cipher->key_length;
if(!isset($key_block_bytes)) $key_block_bytes = $cipher->block_size;
return array($cipher, $key_bytes, $key_block_bytes);
}