mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-11-09 23:31:00 +00:00
ASN1: little optimization for better performance.
This commit is contained in:
parent
c1c9c38fe6
commit
64c3b309bd
@ -241,6 +241,11 @@ class File_ASN1 {
|
||||
*/
|
||||
function decodeBER($encoded)
|
||||
{
|
||||
if (is_object($encoded) && strtolower(get_class($encoded)) == 'file_asn1_element') {
|
||||
$encoded = $encoded->element;
|
||||
}
|
||||
|
||||
$this->encoded = $encoded;
|
||||
return $this->_decode_ber($encoded);
|
||||
}
|
||||
|
||||
@ -260,14 +265,6 @@ class File_ASN1 {
|
||||
{
|
||||
$decoded = array();
|
||||
|
||||
if (is_object($encoded) && strtolower(get_class($encoded)) == 'file_asn1_element') {
|
||||
$encoded = $encoded->element;
|
||||
}
|
||||
|
||||
if ($start == 0) {
|
||||
$this->encoded = $encoded;
|
||||
}
|
||||
|
||||
while ( strlen($encoded) ) {
|
||||
$current = array('start' => $start);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user