From a98a4f8bb56eacffff1765ff09dd29af26e5fc12 Mon Sep 17 00:00:00 2001 From: Thomas Bruederli Date: Wed, 27 Aug 2014 17:45:21 +0200 Subject: Remove 3rd party libs from our repository and define the dependencies in composer.json-dist. Also remove the ancient utf8 lib and replace it with 'Patchwork UTF-8 for PHP'. For direct git checkouts, copy composer.json-dist into composer.json and run `php composer.phar install` to install the dependencies. --- program/lib/Crypt/GPG/ByteUtils.php | 105 ------------------------------------ 1 file changed, 105 deletions(-) delete mode 100644 program/lib/Crypt/GPG/ByteUtils.php (limited to 'program/lib/Crypt/GPG/ByteUtils.php') diff --git a/program/lib/Crypt/GPG/ByteUtils.php b/program/lib/Crypt/GPG/ByteUtils.php deleted file mode 100644 index 342905471..000000000 --- a/program/lib/Crypt/GPG/ByteUtils.php +++ /dev/null @@ -1,105 +0,0 @@ - - * @copyright 2013 silverorange - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id$ - * @link http://pear.php.net/package/Crypt_GPG - */ - -// {{{ class Crypt_GPG_ByteUtils - -/** - * A class for performing byte-wise string operations - * - * GPG I/O streams are managed using bytes rather than characters. This class - * requires the mbstring extension to be available. - * - * @category Encryption - * @package Crypt_GPG - * @author Michael Gauthier - * @copyright 2013 silverorange - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @link http://pear.php.net/package/Crypt_GPG - * @link http://php.net/mbstring - */ -class Crypt_GPG_ByteUtils -{ - // {{{ strlen() - - /** - * Gets the length of a string in bytes - * - * This is used for stream-based communication with the GPG subprocess. - * - * @param string $string the string for which to get the length. - * - * @return integer the length of the string in bytes. - */ - public static function strlen($string) - { - return mb_strlen($string, '8bit'); - } - - // }}} - // {{{ substr() - - /** - * Gets the substring of a string in bytes - * - * This is used for stream-based communication with the GPG subprocess. - * - * @param string $string the input string. - * @param integer $start the starting point at which to get the substring. - * @param integer $length optional. The length of the substring. - * - * @return string the extracted part of the string. Unlike the default PHP - * substr() function, the returned value is - * always a string and never false. - */ - public static function substr($string, $start, $length = null) - { - if ($length === null) { - return mb_substr( - $string, - $start, - self::strlen($string) - $start, '8bit' - ); - } - - return mb_substr($string, $start, $length, '8bit'); - } - - // }}} -} - -// }}} - -?> -- cgit v1.2.3