diff options
author | Mike Macgirvin <mike@macgirvin.com> | 2010-10-06 21:13:15 -0700 |
---|---|---|
committer | Mike Macgirvin <mike@macgirvin.com> | 2010-10-06 21:13:15 -0700 |
commit | 9c10ada9060c9745f49652469e172be8152f6cad (patch) | |
tree | 6ca000ed0e0ca398060262bc9d60654711c4f66c /library/asn1.php | |
parent | a0ecdd025eadf22142c7ed5018b930127ea10d9f (diff) | |
download | volse-hubzilla-9c10ada9060c9745f49652469e172be8152f6cad.tar.gz volse-hubzilla-9c10ada9060c9745f49652469e172be8152f6cad.tar.bz2 volse-hubzilla-9c10ada9060c9745f49652469e172be8152f6cad.zip |
salmon-magic-public-freaking-nasty-keys
Diffstat (limited to 'library/asn1.php')
-rw-r--r-- | library/asn1.php | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/library/asn1.php b/library/asn1.php index 5b1ad3b8f..132b03248 100644 --- a/library/asn1.php +++ b/library/asn1.php @@ -186,7 +186,7 @@ class ASN_BASE { case ASN_BOOLEAN: return new ASN_BOOLEAN((bool)$data); case ASN_INTEGER: - return new ASN_INTEGER(accum($data)); + return new ASN_INTEGER(strtr(base64_encode($data),'+/=','-_,')); // return new ASN_INTEGER(ord($data)); case ASN_BIT_STR: return new ASN_BIT_STR(self::parseASNString($data, $level+1, $maxLevels)); @@ -292,12 +292,7 @@ class ASN_BASE { function accum($s) { - $len = strlen($s); - $result = ''; - for ($i=0; $i < $len; $i++) { - $cur = substr($s,$i,1); - $result .= bin2hex($cur); - } + $result = strtr(base64_encode($s),'+/=','-_,'); return $result; } |