-
-
Notifications
You must be signed in to change notification settings - Fork 0
Wiki StrEncode
final class \FireHub\Core\Support\LowLevel\StrEncode()
Important
This class is marked as final.
Encoding is the process of assigning numbers to graphical characters, especially the written characters of human language, allowing them to be stored, transmitted, and transformed using digital computers.
This class was created by Danijel Galić <danijel.galic@outlook.com>
Copyright: 2024 FireHub Web Application Framework
License: <https://opensource.org/licenses/OSL-3.0> OSL Open Source License version 3
Version: GIT: $Id$ Blob checksum.
Fully Qualified Class Name: \FireHub\Core\Support\LowLevel\StrEncode
Source code: view source code
Blame: view blame
History: view history
Type | Name | Title |
---|---|---|
public static | base64Encode | ### Encodes string with MIME base64 |
public static | base64Decode | ### Decodes data encoded with MIME base64 |
public static | uuEncode | ### Uuencode a string |
public static | uuDecode | ### Decode an uuencoded data |
public static | quotedPrintableEncode | ### Convert a 8bit string to a quoted-printable data |
public static | quotedPrintableDecode | ### Convert a quoted-printable data to an 8 bit string |
public static StrEncode::base64Encode(string $string):string
This encoding is designed to make binary data survive transport through transport layers that are not 8-bit clean, such as mail bodies. Base64-encoded data takes about 33% more space than the original data.
Source code: view source code
Blame: view blame
- string $string - The data to be encoded.
- string - Base64 encoded data.
public static StrEncode::base64Decode(string $data):string
Source code: view source code
Blame: view blame
- string $data - The base64 encoded data.
- \Error - If we cannot decode $data to base64.
- string - Decoded string.
public static StrEncode::uuEncode(string $string):string
Note
UUEncode neither produces the beginning nor the end line, which are part of uuencoded files.
Encodes a string using the uuencode algorithm. Uuencode translates all strings (including binary data) into printable characters, making them safe for network transmissions. Uuencoded data is about 35% larger than the original.
Source code: view source code
Blame: view blame
- string $string - The data to be encoded.
- string - The uuencoded data.
public static StrEncode::uuDecode(string $data):string
Note
UUDecode neither accepts the beginning nor the end line, which are part of uuencoded files.
Source code: view source code
Blame: view blame
- string $data - The uuencoded data.
- \Error - If we cannot uudecode $data.
- string - Decoded data as a string.
public static StrEncode::quotedPrintableEncode(string $string):string
Note
This method is a useful tool for working with email messages.
Source code: view source code
Blame: view blame
- string $string - The data to be encoded.
- string - Quoted-printable encoded data.
public static StrEncode::quotedPrintableDecode(string $data):string
Note
This method is a useful tool for working with email messages.
Source code: view source code
Blame: view blame
- string $data - The quoted printable data.
- string - The 8-bit binary string.
Build with phpDocumentor using template FireHub phpDocumentor Wiki Template.