mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-11-09 15:20:58 +00:00
Merge pull request #510 from cnelissen/FixFileAsn1Classes
Split File_ASN1 and File_ASN1_Element into separate files * cnelissen/FixFileAsn1Classes: Code sniffer php version fix Removed duplicated docblock text Codesniff fix Split File_ASN1 and File_ASN1_Element into separate files
This commit is contained in:
commit
dbbc21cb64
@ -108,35 +108,10 @@ define('FILE_ASN1_TYPE_ANY', -2);
|
||||
/**#@-*/
|
||||
|
||||
/**
|
||||
* ASN.1 Element
|
||||
*
|
||||
* Bypass normal encoding rules in File_ASN1::encodeDER()
|
||||
*
|
||||
* @package File_ASN1
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
* @access public
|
||||
* Include File_ASN1_Element
|
||||
*/
|
||||
class File_ASN1_Element
|
||||
{
|
||||
/**
|
||||
* Raw element value
|
||||
*
|
||||
* @var String
|
||||
* @access private
|
||||
*/
|
||||
var $element;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param String $encoded
|
||||
* @return File_ASN1_Element
|
||||
* @access public
|
||||
*/
|
||||
function __construct($encoded)
|
||||
{
|
||||
$this->element = $encoded;
|
||||
}
|
||||
if (!class_exists('File_ASN1_Element')) {
|
||||
include_once 'ASN1/Element.php';
|
||||
}
|
||||
|
||||
/**
|
||||
|
63
phpseclib/File/ASN1/Element.php
Normal file
63
phpseclib/File/ASN1/Element.php
Normal file
@ -0,0 +1,63 @@
|
||||
<?php
|
||||
/**
|
||||
* Pure-PHP ASN.1 Parser
|
||||
*
|
||||
* PHP versions 4 and 5
|
||||
*
|
||||
* LICENSE: Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
* @category File
|
||||
* @package File_ASN1
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
* @copyright MMXII Jim Wigginton
|
||||
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
/**
|
||||
* ASN.1 Element
|
||||
*
|
||||
* Bypass normal encoding rules in File_ASN1::encodeDER()
|
||||
*
|
||||
* @package File_ASN1
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
* @access public
|
||||
*/
|
||||
class File_ASN1_Element
|
||||
{
|
||||
/**
|
||||
* Raw element value
|
||||
*
|
||||
* @var String
|
||||
* @access private
|
||||
*/
|
||||
var $element;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param String $encoded
|
||||
* @return File_ASN1_Element
|
||||
* @access public
|
||||
*/
|
||||
function __construct($encoded)
|
||||
{
|
||||
$this->element = $encoded;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user