Skip to content

Commit

Permalink
ASN1: explain the use of BigInteger's for handling OID's
Browse files Browse the repository at this point in the history
  • Loading branch information
terrafrost committed Jan 25, 2025
1 parent 42a0603 commit 3bb2976
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions phpseclib/File/ASN1.php
Original file line number Diff line number Diff line change
Expand Up @@ -1152,6 +1152,8 @@ private static function encode_der($source, array $mapping, $idx = null, array $
*/
public static function decodeOID($content)
{
// BigInteger's are used because of OIDs like 2.25.329800735698586629295641978511506172918
// https://healthcaresecprivacy.blogspot.com/2011/02/creating-and-using-unique-id-uuid-oid.html elaborates.
static $eighty;
if (!$eighty) {
$eighty = new BigInteger(80);
Expand Down

0 comments on commit 3bb2976

Please sign in to comment.