From 86910352288cd2bd96af170eb3c766041e1e2c47 Mon Sep 17 00:00:00 2001 From: terrafrost Date: Thu, 24 Sep 2015 09:29:00 -0500 Subject: [PATCH] Crypt/Base: add getBlockLength() method --- phpseclib/Crypt/Base.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/phpseclib/Crypt/Base.php b/phpseclib/Crypt/Base.php index e3840e00..7087c6ce 100644 --- a/phpseclib/Crypt/Base.php +++ b/phpseclib/Crypt/Base.php @@ -576,7 +576,7 @@ class Crypt_Base } /** - * Returns the current key length + * Returns the current key length in bits * * @access public * @return int @@ -586,6 +586,17 @@ class Crypt_Base return $this->key_size << 3; } + /** + * Returns the current block length in bits + * + * @access public + * @return int + */ + function getBlockLength() + { + return $this->block_size << 3; + } + /** * Sets the key. *