PackageTrack
Sign in Get early access

convertlib

Fast and error resilient codecs. Supports Base2, Base8, Base16, Base32, Base64, BigInt, UTF-8, and the PHC/crypt string format.

3.6.1 60K downloads/mo #1370 most downloaded on pub.dev bitanon/convertlib

What this package is like to depend on

Last release 1 months ago

22 Jul 2026

Too new to tell

only 2 release windows

Nearly every release is documented

notes for 5 of 5 stable releases

Nothing withdrawn

no release was ever pulled

1 months old

5 releases · first in 2026

5 releases in the last 12 months

see the full history below

Release timeline

5 releases · Jul 2026 to Jul 2026
Release Pre-release

Releases

latest 5
  1. 3.6.1 22 Jul 2026
    Release notes
    • Update README.md for the 3.6.0 API: the to<Name>Bytes byte encoders, the
      non-throwing tryFrom<Name> decoders, constantTimeEquals, the exported
      converter base classes, and the case-insensitive Crockford decoding.

    Full Changelog: v3.6.0...v3.6.1

    Open source →
    Release notes
    • Update README.md for the 3.6.0 API: the to<Name>Bytes byte encoders, the non-throwing tryFrom<Name> decoders, constantTimeEquals, the exported converter base classes, and the case-insensitive Crockford decoding.
    Open source →
  2. 3.6.0 22 Jul 2026
    Release notes
    • [Breaking Changes]
      • CipherlibConverter -> BitConverter (the exported bit-converter base class).
      • BigIntDecoder narrows from Converter<BigInt, Iterable<int>> to
        Converter<BigInt, Uint8List>; BigIntCodec decoders now return a Uint8List.
    • Export the ByteEncoder, ByteDecoder, AlphabetEncoder, and AlphabetDecoder
      base classes, previously part of the API surface but not reachable through
      package:convertlib/convertlib.dart.
    • Add constantTimeEquals, a top-level constant-time byte comparison for
      verifying MACs and digests without wrapping them in a ByteCollector.
    • Add toHexBytes, toBinaryBytes, toOctalBytes, toBase32Bytes, and
      toBase64Bytes, returning the encoded ASCII output as a Uint8List without
      the intermediate String.
    • Add non-throwing decoders tryFromHex, tryFromBinary, tryFromOctal,
      tryFromBase32, tryFromBase64, tryFromUtf8, and tryFromBigInt, which
      return null instead of throwing a FormatException on invalid input.
    • Fix the UTF-8 encoder emitting invalid bytes for scalar code points in
      U+10000..U+10FFFF; UTF8Encoder.convert now uses the 4-byte form (the public
      toUtf8 was unaffected). Verified against dart:convert.
    • Make the Crockford Base-32 decoder case-insensitive and decode the ambiguous
      letters I/i/L/l as 1 and O/o as 0. Encoding output is unchanged.
    • Fix ByteCollector.number truncating values wider than 32 bits on the web; it
      now accumulates with multiplication and is exact up to 2^53 (VM unchanged).
    • ByteCollector.isEqual returns false for a [String] that is not valid
      hexadecimal instead of throwing a FormatException, matching its contract.
    • Add value-based == and hashCode to CryptData; a null and an empty
      params map now compare equal (both encode to the same string).
    • PHC/crypt: allow empty parameter values (e.g. $id$data=), and fix the decoder
      mis-classifying a comma-containing v=... segment as the version.
    • Speed up fromBase32/fromBase64 decoding and the generic AlphabetEncoder by
      removing extra allocations and passes; output is byte-identical.
    • Clarify the FormatException message for non-canonical encoded input:
      'Invalid length' is now 'Invalid length or non-zero trailing bits'.

    Full Changelog: v3.5.1...v3.6.0

    Open source →
    Release notes
    • [Breaking Changes]
      • CipherlibConverter -> BitConverter (the exported bit-converter base class).
      • BigIntDecoder narrows from Converter<BigInt, Iterable<int>> to Converter<BigInt, Uint8List>; BigIntCodec decoders now return a Uint8List.
    • Export the ByteEncoder, ByteDecoder, AlphabetEncoder, and AlphabetDecoder base classes, previously part of the API surface but not reachable through package:convertlib/convertlib.dart.
    • Add constantTimeEquals, a top-level constant-time byte comparison for verifying MACs and digests without wrapping them in a ByteCollector.
    • Add toHexBytes, toBinaryBytes, toOctalBytes, toBase32Bytes, and toBase64Bytes, returning the encoded ASCII output as a Uint8List without the intermediate String.
    • Add non-throwing decoders tryFromHex, tryFromBinary, tryFromOctal, tryFromBase32, tryFromBase64, tryFromUtf8, and tryFromBigInt, which return null instead of throwing a FormatException on invalid input.
    • Fix the UTF-8 encoder emitting invalid bytes for scalar code points in U+10000..U+10FFFF; UTF8Encoder.convert now uses the 4-byte form (the public toUtf8 was unaffected). Verified against dart:convert.
    • Make the Crockford Base-32 decoder case-insensitive and decode the ambiguous letters I/i/L/l as 1 and O/o as 0. Encoding output is unchanged.
    • Fix ByteCollector.number truncating values wider than 32 bits on the web; it now accumulates with multiplication and is exact up to 2^53 (VM unchanged).
    • ByteCollector.isEqual returns false for a [String] that is not valid hexadecimal instead of throwing a FormatException, matching its contract.
    • Add value-based == and hashCode to CryptData; a null and an empty params map now compare equal (both encode to the same string).
    • PHC/crypt: allow empty parameter values (e.g. $id$data=), and fix the decoder mis-classifying a comma-containing v=... segment as the version.
    • Speed up fromBase32/fromBase64 decoding and the generic AlphabetEncoder by removing extra allocations and passes; output is byte-identical.
    • Clarify the FormatException message for non-canonical encoded input: 'Invalid length' is now 'Invalid length or non-zero trailing bits'.
    Open source →
  3. 3.5.1 08 Jul 2026
    Release notes
    • Widen fromUtf8 to accept any List<int> input instead of requiring a
      Uint8List. Non-Uint8List inputs are copied to a Uint8List before
      decoding.

    Full Changelog: v3.5.0...v3.5.1

    Open source →
    Release notes
    • Widen fromUtf8 to accept any List<int> input instead of requiring a Uint8List. Non-Uint8List inputs are copied to a Uint8List before decoding.
    Open source →
  4. 3.5.0 08 Jul 2026
    Release notes
    • [Breaking Changes]
      • Renames internal abstract class HashlibConverter to CipherlibConverter.
      • Removes encodeString, decodeString from IterableCodec.
    • Fix CryptDataBuilder.param to throw an ArgumentError when the value is
      null, instead of a raw TypeError.
    • Speed up Base-64 and Base-32 encoding with specialized single-pass encoders.
      Base-64 encoding now outperforms dart:convert.
    • Speed up Base-64 and Base-32 decoding with specialized single-pass decoders.
      Base-64 decoding now outperforms dart:convert.
    • Speed up toUtf8 using Uint8List buffer instead of plain List<int>.
      UTF-8 encoding now outperforms dart:convert.
    • Speed up fromUtf8 with a dedicated byte-to-string decoder.
      UTF-8 decoding now matches closely with dart:convert.
    • Refactor existing benchmarks and add missing ones. Dropping benchmark_harness
      dependency in favor of custom benchmarking class with better flexibility.

    Full Changelog: v3.4.0...v3.5.0

    Open source →
    Release notes
    • [Breaking Changes]
      • Removes encodeString, decodeString from IterableCodec.
    • Renames internal abstract class HashlibConverter to CipherlibConverter.
    • Fix CryptDataBuilder.param to throw an ArgumentError when the value is null, instead of a raw TypeError.
    • Speed up Base-64 and Base-32 encoding with specialized single-pass encoders. Base-64 encoding now outperforms dart:convert.
    • Speed up Base-64 and Base-32 decoding with specialized single-pass decoders. Base-64 decoding now outperforms dart:convert.
    • Speed up toUtf8 using Uint8List buffer instead of plain List<int>. UTF-8 encoding now outperforms dart:convert.
    • Speed up fromUtf8 with a dedicated byte-to-string decoder. UTF-8 decoding now matches closely with dart:convert.
    • Refactor existing benchmarks and add missing ones. Dropping benchmark_harness dependency in favor of custom benchmarking class with better flexibility.
    Open source →
  5. 3.4.0 07 Jul 2026
    Release notes
    • Rename the package from hashlib_codecs to convertlib. The public API is
      unchanged: update the dependency to convertlib and imports to
      package:convertlib/convertlib.dart.
    • The hashlib_codecs package continues to be published as a thin re-export of
      convertlib for backward compatibility, and will be discontinued after a
      migration period.

    Full Changelog: v3.3.1...v3.4.0

    Open source →
    Release notes
    • Rename the package from hashlib_codecs to convertlib. The public API is unchanged: update the dependency to convertlib and imports to package:convertlib/convertlib.dart.
    • The hashlib_codecs package continues to be published as a thin re-export of convertlib for backward compatibility, and will be discontinued after a migration period.
    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive