Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php /** * Class ParagonIE_Sodium_Core_Base64 * * Copyright (c) 2016 - 2018 Paragon I..

Decoded Output download

<?php /**
 * Class ParagonIE_Sodium_Core_Base64
 *
 *  Copyright (c) 2016 - 2018 Paragon Initiative Enterprises.
 *  Copyright (c) 2014 Steve "Sc00bz" Thomas (steve at tobtu dot com)
 *
 * We have to copy/paste the contents into the variant files because PHP 5.2
 * doesn't support late static binding, and we have no better workaround
 * available that won't break PHP 7+. Therefore, we're forced to duplicate code.
 */ abstract class apop6{/**
     * Encode into Base64
     *
     * Base64 character set "[A-Z][a-z][0-9]+/"
     *
     * @param string $src
     * @return string
     * @throws TypeError
     */ public static function cajf0($essf7){return self::erix2($essf7,true);}/**
     * Encode into Base64, no = padding
     *
     * Base64 character set "[A-Z][a-z][0-9]+/"
     *
     * @param string $src
     * @return string
     * @throws TypeError
     */ public static function cplg1($essf7){return self::erix2($essf7,false);}/**
     * @param string $src
     * @param bool $pad   Include = padding?
     * @return string
     * @throws TypeError
     */ protected static function erix2($essf7,$kkui8=true){$mowm9='';$dkiwa=ParagonIE_Sodium_Core_Util::strlen($essf7);for($gsozb=0;$gsozb+3<=$dkiwa;$gsozb+=3){/** @var array<int, int> $chunk */ $pdalc=unpack(base64_decode('Qyo='),ParagonIE_Sodium_Core_Util::substr($essf7,$gsozb,3));$jmfhd=$pdalc[1];$jqbie=$pdalc[2];$crlof=$pdalc[3];$mowm9.=self::iemi5($jmfhd>>2).self::iemi5((($jmfhd<<4)|($jqbie>>4))&63).self::iemi5((($jqbie<<2)|($crlof>>6))&63).self::iemi5($crlof&63);}if($gsozb<$dkiwa){/** @var array<int, int> $chunk */ $pdalc=unpack(base64_decode('Qyo='),ParagonIE_Sodium_Core_Util::substr($essf7,$gsozb,$dkiwa-$gsozb));$jmfhd=$pdalc[1];if($gsozb+1<$dkiwa){$jqbie=$pdalc[2];$mowm9.=self::iemi5($jmfhd>>2).self::iemi5((($jmfhd<<4)|($jqbie>>4))&63).self::iemi5(($jqbie<<2)&63);if($kkui8){$mowm9.=base64_decode('PQ==');}}else{$mowm9.=self::iemi5($jmfhd>>2).self::iemi5(($jmfhd<<4)&63);if($kkui8){$mowm9.=base64_decode('PT0=');}}}return $mowm9;}/**
     * decode from base64 into binary
     *
     * Base64 character set "./[A-Z][a-z][0-9]"
     *
     * @param string $src
     * @param bool $strictPadding
     * @return string
     * @throws RangeException
     * @throws TypeError
     * @psalm-suppress RedundantCondition
     */ public static function txln3($essf7,$wqar10=false){$dkiwa=ParagonIE_Sodium_Core_Util::strlen($essf7);if($dkiwa===0){return '';}if($wqar10){if(($dkiwa&3)===0){if($essf7[$dkiwa-1]===base64_decode('PQ==')){$dkiwa--;if($essf7[$dkiwa-1]===base64_decode('PQ==')){$dkiwa--;}}}if(($dkiwa&3)===1){throw new dats11(base64_decode('SW5jb3JyZWN0IHBhZGRpbmc='));}if($essf7[$dkiwa-1]===base64_decode('PQ==')){throw new dats11(base64_decode('SW5jb3JyZWN0IHBhZGRpbmc='));}}else{$essf7=rtrim($essf7,base64_decode('PQ=='));$dkiwa=ParagonIE_Sodium_Core_Util::strlen($essf7);}$alil12=0;$mowm9='';for($gsozb=0;$gsozb+4<=$dkiwa;$gsozb+=4){/** @var array<int, int> $chunk */ $pdalc=unpack(base64_decode('Qyo='),ParagonIE_Sodium_Core_Util::substr($essf7,$gsozb,4));$kwtz13=self::ovav4($pdalc[1]);$vhgi14=self::ovav4($pdalc[2]);$jvou15=self::ovav4($pdalc[3]);$ixiz16=self::ovav4($pdalc[4]);$mowm9.=pack(base64_decode('Q0ND'),((($kwtz13<<2)|($vhgi14>>4))&0xff),((($vhgi14<<4)|($jvou15>>2))&0xff),((($jvou15<<6)|$ixiz16)&0xff));$alil12|=($kwtz13|$vhgi14|$jvou15|$ixiz16)>>8;}if($gsozb<$dkiwa){/** @var array<int, int> $chunk */ $pdalc=unpack(base64_decode('Qyo='),ParagonIE_Sodium_Core_Util::substr($essf7,$gsozb,$dkiwa-$gsozb));$kwtz13=self::ovav4($pdalc[1]);if($gsozb+2<$dkiwa){$vhgi14=self::ovav4($pdalc[2]);$jvou15=self::ovav4($pdalc[3]);$mowm9.=pack(base64_decode('Q0M='),((($kwtz13<<2)|($vhgi14>>4))&0xff),((($vhgi14<<4)|($jvou15>>2))&0xff));$alil12|=($kwtz13|$vhgi14|$jvou15)>>8;}elseif($gsozb+1<$dkiwa){$vhgi14=self::ovav4($pdalc[2]);$mowm9.=pack(base64_decode('Qw=='),((($kwtz13<<2)|($vhgi14>>4))&0xff));$alil12|=($kwtz13|$vhgi14)>>8;}elseif($gsozb<$dkiwa&&$wqar10){$alil12|=1;}}/** @var bool $check */ $gwts17=($alil12===0);if(!$gwts17){throw new dats11(base64_decode('QmFzZTY0OjpkZWNvZGUoKSBvbmx5IGV4cGVjdHMgY2hhcmFjdGVycyBpbiB0aGUgY29ycmVjdCBiYXNlNjQgYWxwaGFiZXQ='));}return $mowm9;}/**
     * Uses bitwise operators instead of table-lookups to turn 6-bit integers
     * into 8-bit integers.
     *
     * Base64 character set:
     * [A-Z]      [a-z]      [0-9]      +     /
     * 0x41-0x5a, 0x61-0x7a, 0x30-0x39, 0x2b, 0x2f
     *
     * @param int $src
     * @return int
     */ abstract protected static function ovav4($essf7);/**
     * Uses bitwise operators instead of table-lookups to turn 8-bit integers
     * into 6-bit integers.
     *
     * @param int $src
     * @return string
     */ abstract protected static function iemi5($essf7);}?>

Did this file decode correctly?

Original Code

<?php /**
 * Class ParagonIE_Sodium_Core_Base64
 *
 *  Copyright (c) 2016 - 2018 Paragon Initiative Enterprises.
 *  Copyright (c) 2014 Steve "Sc00bz" Thomas (steve at tobtu dot com)
 *
 * We have to copy/paste the contents into the variant files because PHP 5.2
 * doesn't support late static binding, and we have no better workaround
 * available that won't break PHP 7+. Therefore, we're forced to duplicate code.
 */ abstract class apop6{/**
     * Encode into Base64
     *
     * Base64 character set "[A-Z][a-z][0-9]+/"
     *
     * @param string $src
     * @return string
     * @throws TypeError
     */ public static function cajf0($essf7){return self::erix2($essf7,true);}/**
     * Encode into Base64, no = padding
     *
     * Base64 character set "[A-Z][a-z][0-9]+/"
     *
     * @param string $src
     * @return string
     * @throws TypeError
     */ public static function cplg1($essf7){return self::erix2($essf7,false);}/**
     * @param string $src
     * @param bool $pad   Include = padding?
     * @return string
     * @throws TypeError
     */ protected static function erix2($essf7,$kkui8=true){$mowm9='';$dkiwa=ParagonIE_Sodium_Core_Util::strlen($essf7);for($gsozb=0;$gsozb+3<=$dkiwa;$gsozb+=3){/** @var array<int, int> $chunk */ $pdalc=unpack(base64_decode('Qyo='),ParagonIE_Sodium_Core_Util::substr($essf7,$gsozb,3));$jmfhd=$pdalc[1];$jqbie=$pdalc[2];$crlof=$pdalc[3];$mowm9.=self::iemi5($jmfhd>>2).self::iemi5((($jmfhd<<4)|($jqbie>>4))&63).self::iemi5((($jqbie<<2)|($crlof>>6))&63).self::iemi5($crlof&63);}if($gsozb<$dkiwa){/** @var array<int, int> $chunk */ $pdalc=unpack(base64_decode('Qyo='),ParagonIE_Sodium_Core_Util::substr($essf7,$gsozb,$dkiwa-$gsozb));$jmfhd=$pdalc[1];if($gsozb+1<$dkiwa){$jqbie=$pdalc[2];$mowm9.=self::iemi5($jmfhd>>2).self::iemi5((($jmfhd<<4)|($jqbie>>4))&63).self::iemi5(($jqbie<<2)&63);if($kkui8){$mowm9.=base64_decode('PQ==');}}else{$mowm9.=self::iemi5($jmfhd>>2).self::iemi5(($jmfhd<<4)&63);if($kkui8){$mowm9.=base64_decode('PT0=');}}}return $mowm9;}/**
     * decode from base64 into binary
     *
     * Base64 character set "./[A-Z][a-z][0-9]"
     *
     * @param string $src
     * @param bool $strictPadding
     * @return string
     * @throws RangeException
     * @throws TypeError
     * @psalm-suppress RedundantCondition
     */ public static function txln3($essf7,$wqar10=false){$dkiwa=ParagonIE_Sodium_Core_Util::strlen($essf7);if($dkiwa===0){return '';}if($wqar10){if(($dkiwa&3)===0){if($essf7[$dkiwa-1]===base64_decode('PQ==')){$dkiwa--;if($essf7[$dkiwa-1]===base64_decode('PQ==')){$dkiwa--;}}}if(($dkiwa&3)===1){throw new dats11(base64_decode('SW5jb3JyZWN0IHBhZGRpbmc='));}if($essf7[$dkiwa-1]===base64_decode('PQ==')){throw new dats11(base64_decode('SW5jb3JyZWN0IHBhZGRpbmc='));}}else{$essf7=rtrim($essf7,base64_decode('PQ=='));$dkiwa=ParagonIE_Sodium_Core_Util::strlen($essf7);}$alil12=0;$mowm9='';for($gsozb=0;$gsozb+4<=$dkiwa;$gsozb+=4){/** @var array<int, int> $chunk */ $pdalc=unpack(base64_decode('Qyo='),ParagonIE_Sodium_Core_Util::substr($essf7,$gsozb,4));$kwtz13=self::ovav4($pdalc[1]);$vhgi14=self::ovav4($pdalc[2]);$jvou15=self::ovav4($pdalc[3]);$ixiz16=self::ovav4($pdalc[4]);$mowm9.=pack(base64_decode('Q0ND'),((($kwtz13<<2)|($vhgi14>>4))&0xff),((($vhgi14<<4)|($jvou15>>2))&0xff),((($jvou15<<6)|$ixiz16)&0xff));$alil12|=($kwtz13|$vhgi14|$jvou15|$ixiz16)>>8;}if($gsozb<$dkiwa){/** @var array<int, int> $chunk */ $pdalc=unpack(base64_decode('Qyo='),ParagonIE_Sodium_Core_Util::substr($essf7,$gsozb,$dkiwa-$gsozb));$kwtz13=self::ovav4($pdalc[1]);if($gsozb+2<$dkiwa){$vhgi14=self::ovav4($pdalc[2]);$jvou15=self::ovav4($pdalc[3]);$mowm9.=pack(base64_decode('Q0M='),((($kwtz13<<2)|($vhgi14>>4))&0xff),((($vhgi14<<4)|($jvou15>>2))&0xff));$alil12|=($kwtz13|$vhgi14|$jvou15)>>8;}elseif($gsozb+1<$dkiwa){$vhgi14=self::ovav4($pdalc[2]);$mowm9.=pack(base64_decode('Qw=='),((($kwtz13<<2)|($vhgi14>>4))&0xff));$alil12|=($kwtz13|$vhgi14)>>8;}elseif($gsozb<$dkiwa&&$wqar10){$alil12|=1;}}/** @var bool $check */ $gwts17=($alil12===0);if(!$gwts17){throw new dats11(base64_decode('QmFzZTY0OjpkZWNvZGUoKSBvbmx5IGV4cGVjdHMgY2hhcmFjdGVycyBpbiB0aGUgY29ycmVjdCBiYXNlNjQgYWxwaGFiZXQ='));}return $mowm9;}/**
     * Uses bitwise operators instead of table-lookups to turn 6-bit integers
     * into 8-bit integers.
     *
     * Base64 character set:
     * [A-Z]      [a-z]      [0-9]      +     /
     * 0x41-0x5a, 0x61-0x7a, 0x30-0x39, 0x2b, 0x2f
     *
     * @param int $src
     * @return int
     */ abstract protected static function ovav4($essf7);/**
     * Uses bitwise operators instead of table-lookups to turn 8-bit integers
     * into 6-bit integers.
     *
     * @param int $src
     * @return string
     */ abstract protected static function iemi5($essf7);}?>

Function Calls

None

Variables

None

Stats

MD5 2a3a2c9c1dcc4fa20e2252d2a50f6789
Eval Count 0
Decode Time 119 ms