12345678910111213 |
- <?php
- // codec standard per le stringhe. fs-safe e url-safe, rfc4648 sez. 5
- function encoder($string){
- $string = base64_encode($string);
- // da indagare
- // $string = mb_convert_encoding( $string, "UTF-8", "BASE64" );
- return rtrim(strtr($string,"+/","-_"),"=");
- }
- function decoder($string){
- return base64_decode(strtr($string,"-_","+/"));
- }
- ?>
|