Fixed broken characters.

This commit is contained in:
Gemorroj 2013-02-20 18:11:23 +03:00
parent 1e3e44e3c6
commit 8d5e7a3945
2 changed files with 10 additions and 10 deletions

View File

@ -304,12 +304,12 @@ class File_ASN1 {
} while ( $loop ); } while ( $loop );
} }
// Length, as discussed in <EFBFBD> 8.1.3 of X.690-0207.pdf#page=13 // Length, as discussed in § 8.1.3 of X.690-0207.pdf#page=13
$length = ord($this->_string_shift($encoded)); $length = ord($this->_string_shift($encoded));
$start++; $start++;
if ( $length == 0x80 ) { // indefinite length if ( $length == 0x80 ) { // indefinite length
// "[A sender shall] use the indefinite form (see 8.1.3.6) if the encoding is constructed and is not all // "[A sender shall] use the indefinite form (see 8.1.3.6) if the encoding is constructed and is not all
// immediately available." -- <EFBFBD> 8.1.3.2.c // immediately available." -- § 8.1.3.2.c
//if ( !$constructed ) { //if ( !$constructed ) {
// return false; // return false;
//} //}
@ -323,7 +323,7 @@ class File_ASN1 {
extract(unpack('Nlength', substr(str_pad($temp, 4, chr(0), STR_PAD_LEFT), -4))); extract(unpack('Nlength', substr(str_pad($temp, 4, chr(0), STR_PAD_LEFT), -4)));
} }
// End-of-content, see <EFBFBD><EFBFBD> 8.1.1.3, 8.1.3.2, 8.1.3.6, 8.1.5, and (for an example) 8.6.4.2 // End-of-content, see §§ 8.1.1.3, 8.1.3.2, 8.1.3.6, 8.1.5, and (for an example) 8.6.4.2
if (!$type && !$length) { if (!$type && !$length) {
return $decoded; return $decoded;
} }
@ -357,7 +357,7 @@ class File_ASN1 {
// decode UNIVERSAL tags // decode UNIVERSAL tags
switch ($tag) { switch ($tag) {
case FILE_ASN1_TYPE_BOOLEAN: case FILE_ASN1_TYPE_BOOLEAN:
// "The contents octets shall consist of a single octet." -- <EFBFBD> 8.2.1 // "The contents octets shall consist of a single octet." -- § 8.2.1
//if (strlen($content) != 1) { //if (strlen($content) != 1) {
// return false; // return false;
//} //}
@ -410,7 +410,7 @@ class File_ASN1 {
} }
break; break;
case FILE_ASN1_TYPE_NULL: case FILE_ASN1_TYPE_NULL:
// "The contents octets shall not contain any octets." -- <EFBFBD> 8.8.2 // "The contents octets shall not contain any octets." -- § 8.8.2
//if (strlen($content)) { //if (strlen($content)) {
// return false; // return false;
//} //}
@ -441,7 +441,7 @@ class File_ASN1 {
/* Each character string type shall be encoded as if it had been declared: /* Each character string type shall be encoded as if it had been declared:
[UNIVERSAL x] IMPLICIT OCTET STRING [UNIVERSAL x] IMPLICIT OCTET STRING
-- X.690-0207.pdf#page=23 (<EFBFBD> 8.21.3) -- X.690-0207.pdf#page=23 (§ 8.21.3)
Per that, we're not going to do any validation. If there are any illegal characters in the string, Per that, we're not going to do any validation. If there are any illegal characters in the string,
we don't really care */ we don't really care */
@ -1055,7 +1055,7 @@ class File_ASN1 {
* DER-encode the length * DER-encode the length
* *
* DER supports lengths up to (2**8)**127, however, we'll only support lengths up to (2**8)**4. See * DER supports lengths up to (2**8)**127, however, we'll only support lengths up to (2**8)**4. See
* {@link http://itu.int/ITU-T/studygroups/com17/languages/X.690-0207.pdf#p=13 X.690 <EFBFBD> 8.1.3} for more information. * {@link http://itu.int/ITU-T/studygroups/com17/languages/X.690-0207.pdf#p=13 X.690 § 8.1.3} for more information.
* *
* @access private * @access private
* @param Integer $length * @param Integer $length

View File

@ -2425,12 +2425,12 @@ class Math_BigInteger {
} }
/** /**
* Calculates the greatest common divisor and B<EFBFBD>zout's identity. * Calculates the greatest common divisor and Bézout's identity.
* *
* Say you have 693 and 609. The GCD is 21. B<EFBFBD>zout's identity states that there exist integers x and y such that * Say you have 693 and 609. The GCD is 21. Bézout's identity states that there exist integers x and y such that
* 693*x + 609*y == 21. In point of fact, there are actually an infinite number of x and y combinations and which * 693*x + 609*y == 21. In point of fact, there are actually an infinite number of x and y combinations and which
* combination is returned is dependant upon which mode is in use. See * combination is returned is dependant upon which mode is in use. See
* {@link http://en.wikipedia.org/wiki/B%C3%A9zout%27s_identity B<EFBFBD>zout's identity - Wikipedia} for more information. * {@link http://en.wikipedia.org/wiki/B%C3%A9zout%27s_identity Bézout's identity - Wikipedia} for more information.
* *
* Here's an example: * Here's an example:
* <code> * <code>