Skip to content

Commit

Permalink
Update Support.php
Browse files Browse the repository at this point in the history
  • Loading branch information
mmeyer2k committed Jun 30, 2015
1 parent 383d4ba commit 568762d
Showing 1 changed file with 25 additions and 4 deletions.
29 changes: 25 additions & 4 deletions src/Support.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,28 @@
<?php

/**
* Support.php
*
* PHP version 5
*
* @category Dcrypt
* @package Dcrypt
* @author Michael Meyer (mmeyer2k) <m.meyer2k@gmail.com>
* @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) <m.meyer2k@gmail.com>
* @license http://opensource.org/licenses/MIT The MIT License (MIT)
* @link https://github.com/mmeyer2k/dcrypt
*/
class Support extends Str
{

Expand All @@ -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)
{
Expand All @@ -41,7 +62,7 @@ protected static function hex2bin($hexstr)
if (function_exists('hex2bin')) {
return hex2bin($hexstr);
}

$n = strlen($hexstr);
$sbin = '';
$i = 0;
Expand All @@ -55,7 +76,7 @@ protected static function hex2bin($hexstr)
}
$i+=2;
}

return $sbin;
}

Expand Down

0 comments on commit 568762d

Please sign in to comment.