Version 3.6.0
- [Breaking Changes]
CipherlibConverter->BitConverter(the exported bit-converter base class).BigIntDecodernarrows fromConverter<BigInt, Iterable<int>>to
Converter<BigInt, Uint8List>;BigIntCodecdecoders now return aUint8List.
- Export the
ByteEncoder,ByteDecoder,AlphabetEncoder, andAlphabetDecoder
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 aByteCollector. - Add
toHexBytes,toBinaryBytes,toOctalBytes,toBase32Bytes, and
toBase64Bytes, returning the encoded ASCII output as aUint8Listwithout
the intermediateString. - Add non-throwing decoders
tryFromHex,tryFromBinary,tryFromOctal,
tryFromBase32,tryFromBase64,tryFromUtf8, andtryFromBigInt, which
returnnullinstead of throwing aFormatExceptionon invalid input. - Fix the UTF-8 encoder emitting invalid bytes for scalar code points in
U+10000..U+10FFFF;UTF8Encoder.convertnow uses the 4-byte form (the public
toUtf8was unaffected). Verified againstdart:convert. - Make the Crockford Base-32 decoder case-insensitive and decode the ambiguous
lettersI/i/L/las1andO/oas0. Encoding output is unchanged. - Fix
ByteCollector.numbertruncating values wider than 32 bits on the web; it
now accumulates with multiplication and is exact up to2^53(VM unchanged). ByteCollector.isEqualreturnsfalsefor a [String] that is not valid
hexadecimal instead of throwing aFormatException, matching its contract.- Add value-based
==andhashCodetoCryptData; a null and an empty
paramsmap 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-containingv=...segment as the version. - Speed up
fromBase32/fromBase64decoding and the genericAlphabetEncoderby
removing extra allocations and passes; output is byte-identical. - Clarify the
FormatExceptionmessage for non-canonical encoded input:
'Invalid length'is now'Invalid length or non-zero trailing bits'.
Full Changelog: v3.5.1...v3.6.0