From 568762dee7113fd8bd80d1f4f5fff2935b7e980e Mon Sep 17 00:00:00 2001 From: Michael M Date: Tue, 30 Jun 2015 01:10:52 -0500 Subject: [PATCH] Update Support.php --- src/Support.php | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/src/Support.php b/src/Support.php index ab35749b..84305c0c 100644 --- a/src/Support.php +++ b/src/Support.php @@ -1,7 +1,28 @@ + * @license http://opensource.org/licenses/MIT The MIT License (MIT) + * @link https://github.com/mmeyer2k/dcrypt + */ + namespace Dcrypt; +/** + * Provides numeric data conversion helper functions. + * + * @category Dcrypt + * @package Dcrypt + * @author Michael Meyer (mmeyer2k) + * @license http://opensource.org/licenses/MIT The MIT License (MIT) + * @link https://github.com/mmeyer2k/dcrypt + */ class Support extends Str { @@ -20,9 +41,9 @@ protected static function dec2bin($dec) /** * Reverses dec2bin * - * @param string $bin + * @param string $bin Binary string to convert to decimal * - * @return type + * @return string */ protected static function bin2dec($bin) { @@ -41,7 +62,7 @@ protected static function hex2bin($hexstr) if (function_exists('hex2bin')) { return hex2bin($hexstr); } - + $n = strlen($hexstr); $sbin = ''; $i = 0; @@ -55,7 +76,7 @@ protected static function hex2bin($hexstr) } $i+=2; } - + return $sbin; }