ParagonIE_Sodium_Core_Base64_UrlSafe::decode6Bits() protected WP 1.0
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
{} Это метод класса: ParagonIE_Sodium_Core_Base64_UrlSafe{}
Хуков нет.
Возвращает
Число
. Null. Ничего.
Использование
$result = ParagonIE_Sodium_Core_Base64_UrlSafe::decode6Bits( $src );
- $src(число) (обязательный)
- -
Код ParagonIE_Sodium_Core_Base64_UrlSafe::decode6Bits() ParagonIE Sodium Core Base64 UrlSafe::decode6Bits WP 5.7
protected static function decode6Bits($src)
{
$ret = -1;
// if ($src > 0x40 && $src < 0x5b) $ret += $src - 0x41 + 1; // -64
$ret += (((0x40 - $src) & ($src - 0x5b)) >> 8) & ($src - 64);
// if ($src > 0x60 && $src < 0x7b) $ret += $src - 0x61 + 26 + 1; // -70
$ret += (((0x60 - $src) & ($src - 0x7b)) >> 8) & ($src - 70);
// if ($src > 0x2f && $src < 0x3a) $ret += $src - 0x30 + 52 + 1; // 5
$ret += (((0x2f - $src) & ($src - 0x3a)) >> 8) & ($src + 5);
// if ($src == 0x2c) $ret += 62 + 1;
$ret += (((0x2c - $src) & ($src - 0x2e)) >> 8) & 63;
// if ($src == 0x5f) ret += 63 + 1;
$ret += (((0x5e - $src) & ($src - 0x60)) >> 8) & 64;
return $ret;
}