Download the PHP package skywalker-labs/constant-time-encoding without Composer
On this page you can find all versions of the php package skywalker-labs/constant-time-encoding. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download skywalker-labs/constant-time-encoding
More information about skywalker-labs/constant-time-encoding
Files in skywalker-labs/constant-time-encoding
Package constant-time-encoding
Short Description Constant-time implementations of RFC 4648 encoding (Base64, Base32, Hex) and other variants (Base64UrlSafe, Base64DotSlash, Base32Hex)
License MIT
Homepage https://github.com/skywalker-labs/constant-time-encoding
Informations about the package constant-time-encoding
Skywalker Constant-Time Encoding
Constant-time implementations of RFC 4648 encoding (Base64, Base32, Hex) and other variants.
This library aims to offer character encoding functions that do not leak information about what you are encoding/decoding via processor cache misses.
Features
- Constant-Time Encoding/Decoding: Prevents cache-timing attacks.
- Multiple Encodings:
- Base64 (RFC 4648)
- Base64UrlSafe (URL-safe variant)
- Base64DotSlash (Crypt version,
./[A-Z][a-z][0-9]) - Base64DotSlashOrdered (Ordered variant,
[.-9][A-Z][a-z]) - Base32 (RFC 4648)
- Base32Hex (RFC 4648 base32hex)
- Hex (Base16)
- Security: Uses
pack()andunpack()instead ofchr()andord()for safer bit manipulation. - Robust: Strict padding validation (optional).
Requirements
- PHP 7.4 or newer (including PHP 8.x).
Installation
Usage
You can use the Skywalker\ConstantTime\Encoding class as a facade for all encoding methods, or use specific classes directly.
Using the Encoding Facade
Using Specific Classes
If you only need a specific encoding, you can import the relevant class directly:
Output Example
Security
This library was designed to eliminate cache-timing side-channels from encoding operations. It is intended for use in cryptographic contexts where timing leaks could expose sensitive data.
Support
If your company uses this library in their products or services, you may be interested in purchasing a support contract from Skywalker Labs.
License
This project is licensed under the MIT License - see the LICENSE.txt file for details.