ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
URLSafeTransport.php
Go to the documentation of this file.
1<?php
2
20
25{
26 public function prepareForTransport(string $compressed_token): string
27 {
28 return rtrim(str_replace(['+', '/'], ['-', '_'], base64_encode($compressed_token)), '=');
29 }
30
31 public function readFromTransport(string $compressed_token): string
32 {
33 return base64_decode(str_replace(['-', '_'], ['+', '/'], $compressed_token . '=='));
34 }
35}
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...