Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Constant Time Encoding Laravel Package

paragonie/constant_time_encoding

Fast, secure constant-time encoding/decoding utilities for PHP. Provides Base32, Base64 (incl. URL-safe), and Hex implementations designed to reduce timing side-channel leaks. Ideal for cryptography, tokens, and security-sensitive data handling.

View on GitHub
Deep Wiki
Context7
v3.1.3

This release fixes a bug with base64 codecs when ext-sodium installed.

What's Changed

New Contributors

Full Changelog: https://github.com/paragonie/constant_time_encoding/compare/v3.1.2...v3.1.3

v2.8.1

I'm going to continue backporting important fixes to v2.x for PHP 7 support while there is still significant v2 usage.

What's Changed

Full Changelog: https://github.com/paragonie/constant_time_encoding/compare/v2.8.0...v2.8.1

v3.1.2

Thanks @TimWolla for identifying a performance hit caused by attempting to find global functions such as strlen() in the current namespace before the global namespace.

What's Changed

Full Changelog: https://github.com/paragonie/constant_time_encoding/compare/v3.1.1...v3.1.2

v3.1.1

What's Changed

Full Changelog: https://github.com/paragonie/constant_time_encoding/compare/v3.1.0...v3.1.1

v2.8.0

This release backports the ext-sodium performance enhancement from v3.1.0.

What's Changed

Full Changelog: https://github.com/paragonie/constant_time_encoding/compare/v2.7.0...v2.8.0

v3.1.0

Important: If you enable ext-sodium, some codecs will now be faster with our library: hex, base64, base64url. This requires the actual extension be installed; sodium_compat will not provide these implementations.

As with the recent sodium_compat release, this library now incorporates fuzz-testing and mutation testing as part of our development strategy. Fuzz testing is enabled on pull requests; mutation tests on releases.

The current metrics for a mutation test run (using the latest version of Infection):

 1782 mutations were generated:
    1470 mutants were killed by Test Framework
     296 covered mutants were not detected
       5 errors were encountered
      11 time outs were encountered
Metrics:
         Mutation Code Coverage: 100%
         Covered Code MSI: 83%

We set the minimum MSI for covered code to 80% by policy, but will slowly be increasing it in future releases.

What's Changed

Full Changelog: https://github.com/paragonie/constant_time_encoding/compare/v3.0.0...v3.1.0

v3.0.0
  • New major bump due to increased minimum PHP requirements (from PHP 7 to PHP 8)
  • Supports PHP 8.4 without deprecation warnings for implicit null
v2.6.3
  • #40 - Improved performance of Hex
  • #43 / #46 - Add .gitattributes to .gitattributes
  • #41 - Consistent use of \ global namespace qualifiers
v2.6.2
  • #45 Fix regression from 2.6.1
v2.6.1
v2.6.0
  • Resolved #22 by fixing the behavior of strict mode (decode($str, true)).
  • Added decodeNoPadding() to Base32, Base64, and its child classes.
    • This is a strict variant of the encoding that doesn't accept = padding at all.
v2.5.0
  • Switched from Travis CI to GitHub Actions
  • Fix parameter names for PHP 8
  • Cover PHP 8.1+ in unit testing
v1.1.0
  • Support PHP 8
  • Migrate to GitHub Actions
v2.4.0
  • #25 - Fixed exception message
  • Support PHP 8
v2.3.0

Supports PHP 7.3, 7.4, and 8.x (currently only for testing against the master branch in Travis CI)

v1.0.4
  • Adds Base32::encodeUnpadded() from v1.x branch.
v1.0.3
  • #15 -- encodeUnpadded() added to Base64.
v2.2.2
  • This library now has 100% type-safety.
  • Added unit tests to detect string truncation bugs that were (mistakenly?) reported.
v1.0.2
  • Backport of fixes from v2 branch. See #14.
  • Type safety.
v2.2.1
v2.2.0
  • Adds encodeUnpadded() to Base32 and Base64 (and their derived classes). Satisfies #9.
v2.1.1

Fix composer.json typo.

v2.1.0

Previous tag was a false alarm. This is the real deal.

This library is now type-safe. Encoding functions (e.g. Base64::decode()) will always return a string or throw a RangeException. They will never return false.

Furthermore, type safety is assured with Psalm.

v2.0.3

Throw a RangeException instead of returning false in a function with a return type of string.

v2.0.2

Handle an edge-case reported in #4

v1.0.1

Handle edge-case reported in #4

v2.0.1
  • Added scalar type declarations to Binary.
v2.0.0

Version 2 will require PHP 7 and use scalar type declarations.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport
twbs/bootstrap4
php-http/client-implementation
phpcr/phpcr-implementation
cucumber/gherkin-monorepo
haydenpierce/class-finder
psr/simple-cache-implementation
uri-template/tests