Search packages, repositories and app categories

Package detailsv1.0.1

base_codecs

A set of base16 (hex), base32 (Rfc, RfcHex, Crockford, ZBase, GeoHash, WordSafe), Base58 (Bitcoin, Flickr, Ripple) with Base58Check, base85 (Ascii85, Z85, IPv6) codecs

AndroidiOSWebmacOSWindowsLinux
30-day downloads
26.9K
Likes
5
Pub points
150

Install package

flutter pub add base_codecs

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

A comprehensive Dart package providing multiple base encoding and decoding utilities, including base16 (hex), base32 (RFC, Crockford, ZBase, GeoHash, WordSafe), base58 (Bitcoin, Flickr, Ripple with Base58Check), and base85 (Ascii85, Z85, IPv6). Designed for secure data representation and interoperability across systems, it supports various standards used in cryptography, blockchain, and network protocols. The package is lightweight, platform-agnostic, and suitable for use in Flutter apps across Android, iOS, Web, macOS, Windows, and Linux.

Use cases

  • Encoding cryptographic keys
  • Generating short URLs
  • Storing binary data in text formats
  • Interoperating with blockchain systems
  • Creating compact identifiers
  • Representing IP addresses in readable form

Key features

  • Supports multiple base encodings
  • Includes Base58Check for checksum validation
  • Cross-platform compatibility
  • Lightweight and efficient
  • Standard-compliant implementations
  • Easy integration via Flutter pub

Suitable for

  • Developers working with blockchain or crypto
  • Apps needing compact data encoding
  • Systems requiring secure string representations
  • Cross-platform applications
  • Tools handling binary-to-text conversion
  • Network protocol implementations

Considerations

  • Ensure correct codec selection for specific use case
  • Verify checksums when using Base58Check
  • Be mindful of case sensitivity in some encodings
  • Test edge cases with invalid input
  • Avoid using base58 for high-security contexts without additional safeguards
  • Review performance for large data sets

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

codecov Build Status pub style: lint

A set of codecs for encode and decode data.

Features

Base16

Supported hex alphabet and custom alphabets.

Hex
  • Codec - Base16Codec
  • codec variable - base16 (and alias hex)
  • Functions - base16Encode (hexEncode), base16Decode (hexDecode)
Custom
  • Codec - Base16CodecCustom
  • Description - You can pass custom alphabet to Codec for encode and decode data by this alphabet.

Base32

Supported Rfc, RfcHex, Crockford, ZBase, GeoHash, WordSafe, Custom alphabets

Rfc
  • Codec - Base32CodecRfc
  • codec variable - base32Rfc
  • Functions - base32RfcEncode, base32RfcDecode
RfcHex
  • Codec - Base32CodecRfcHex
  • codec variable - base32RfcHex
  • Functions - base32RfcHexEncode, base32RfcHexDecode
Crockford
  • Codec - Base32CodecCrockford
  • codec variable - base32Crockford
  • Functions - base32CrockfordEncode, base32CrockfordDecode
ZBase
  • Codec - Base32CodecZBase
  • codec variable - base32ZBase
  • Functions - base32ZBaseEncode, base32ZBaseDecode
GeoHash
  • Codec - Base32CodecGeoHash
  • codec variable - base32GeoHash
  • Functions - base32GeoHashEncode, base32GeoHashDecode
WordSafe
  • Codec - Base32CodecWordSafe
  • codec variable - base32WordSafe
  • Functions - base32WordSafeEncode, base32WordSafeDecode
Custom
  • Codec - Base32CodecCustom
  • Description - You can pass custom alphabet and padding to Codec for encode and decode data by this alphabet.

Base58

Supported Bitcoin, Flickr, Ripple, Custom alphabets

Bitcoin
  • Codec - Base58CodecBitcoin
  • codec variable - base58Bitcoin
  • Functions - base58BitcoinEncode, base58BitcoinDecode
Flickr
  • Codec - Base58CodecFlickr
  • codec variable - base58Flickr
  • Functions - base58FlickrEncode, base58FlickrDecode
Ripple
  • Codec - Base58CodecRipple
  • codec variable - base58Ripple
  • Functions - base58RippleEncode, base58RippleDecode
Custom
  • Codec - Base58CodecCustom
  • Description - You can pass custom alphabet and decodeList to Codec for encode and decode data by this alphabet.
Base58Check
  • Functions - base58CheckEncode, base58CheckDecode

Base85

Supported Ascii85, ZeroMq, IPv6

Ascii85
  • Codec - Base85CodecAscii
  • codec variable - base85Ascii
  • Functions - base85AsciiEncode, base85AsciiDecode
ZeroMq
  • Codec - Base85CodecZ
  • codec variable - base85Z
  • Functions - base85ZEncode, base85ZDecode
IPv6
  • Codec - Base85CodecIPv6
  • codec variable - base85IPv6
  • Functions - base85IPv6Encode, base85IPv6Decode

Categories

Dependencies

Dependency list 1 items

Source repository

Projects using this package