From 08ae2c57d1689df570b7f8db39f129da2e933cca Mon Sep 17 00:00:00 2001 From: Daniel Ruf Date: Mon, 14 Mar 2016 12:10:17 +0100 Subject: [PATCH] use $cipher->key_length starting with phpseclib 2.0.1, `key_size` was renamed to `key_length` --- lib/openpgp_crypt_symmetric.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/openpgp_crypt_symmetric.php b/lib/openpgp_crypt_symmetric.php index 32af72a..120d4d9 100644 --- a/lib/openpgp_crypt_symmetric.php +++ b/lib/openpgp_crypt_symmetric.php @@ -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); }