Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Decodes data encoded with MIME base64
<?php base64_decode(string $string, bool $strict = false): string|false
<?php PHPUnit::assertEquals(
$content,
base64_decode($downloadedContent)
);
}
<?php public function extractOriginalNameFromFilePath($path)
{
return base64_decode(head(explode('-', last(explode('-meta', str($path)->replace('_', '/'))))));
}
public static function createFromLivewire($filePath)
<?php function resurrectMountParams($encoded)
{
$snapshot = json_decode(base64_decode($encoded), associative: true);
$this->registerContainerComponent();
<?php $key = $this->app['config']['app.key'];
if (str_starts_with($key, 'base64:')) {
$key = base64_decode(substr($key, 7));
}
$connection = $config['connection'] ?? null;
<?php {
if ($this->connection instanceof PostgresConnection &&
! Str::contains($serialized, [':', ';'])) {
$serialized = base64_decode($serialized);
}
try {
<?php protected function unserialize($value)
{
if ($this->connection instanceof PostgresConnection && ! Str::contains($value, [':', ';'])) {
$value = base64_decode($value);
}
return unserialize($value);
<?php {
$payload = $this->getJsonPayload($payload);
$iv = base64_decode($payload['iv']);
$this->ensureTagIsValid(
$tag = empty($payload['tag']) ? null : base64_decode($payload['tag'])
<?php $iv = base64_decode($payload['iv']);
$this->ensureTagIsValid(
$tag = empty($payload['tag']) ? null : base64_decode($payload['tag'])
);
$foundValidMac = false;
<?php throw new DecryptException('The payload is invalid.');
}
$payload = json_decode(base64_decode($payload), true);
<?php return false;
}
return strlen(base64_decode($payload['iv'], true)) === openssl_cipher_iv_length(strtolower($this->cipher));
}
<?php protected function parseKey(array $config)
{
if (Str::startsWith($key = $this->key($config), $prefix = 'base64:')) {
$key = base64_decode(Str::after($key, $prefix));
}
return $key;
<?php protected function parseKey(string $key)
{
if (Str::startsWith($key, $prefix = 'base64:')) {
$key = base64_decode(Str::after($key, $prefix));
}
return $key;
<?php protected function parseKey(string $key)
{
if (Str::startsWith($key, $prefix = 'base64:')) {
$key = base64_decode(Str::after($key, $prefix));
}
return $key;
<?php public static function isValid(string $cookie, string $key)
{
$payload = json_decode(base64_decode($cookie), true);
return is_array($payload) &&
is_numeric($payload['expires_at'] ?? null) &&
<?php $this->sent = $data['sent'];
$this->data = (($data['hasAttachments'] ?? false) === true)
? unserialize(base64_decode($data['data']))
: $data['data'];
}