Merge pull request #28 from DanielRuf/patch-2

use $cipher->key_length
This commit is contained in:
Stephen Paul Weber 2016-03-15 08:23:47 -04:00
commit 859efcbee3

View File

@ -170,7 +170,7 @@ class OpenPGP_Crypt_Symmetric {
break; break;
} }
if(!$cipher) return array(NULL, NULL, NULL); // Unsupported cipher 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; if(!isset($key_block_bytes)) $key_block_bytes = $cipher->block_size;
return array($cipher, $key_bytes, $key_block_bytes); return array($cipher, $key_bytes, $key_block_bytes);
} }