Package selection guidance compiled from public package information, community data, and project usage.
A Dart package for encoding and decoding data using the Base32 algorithm, designed to handle One Time Password (OTP) secrets securely. It supports standard Base32 encoding as defined in RFC 4648, ensuring compatibility across platforms. The package is lightweight and efficient, making it ideal for applications requiring secure, human-readable representations of binary data. It works seamlessly across all major platforms including Android, iOS, Web, macOS, Windows, and Linux.
Use cases
Generating OTP secrets
Secure data encoding
Cross-platform token handling
Encoding binary data for text storage
Interoperability with OTP apps like Google Authenticator
pub.dev: (you can use 'any' instead of a version if you just want the latest always)
dependencies:base32:2.1.3
import'package:base32/base32.dart';
Start encoding/decoding ...
// Encode a hex string to base32
base32.encodeHexString('48656c6c6f21deadbeef'); // -> 'JBSWY3DPEHPK3PXP'// base32 decoding to original string.
base32.decodeAsHexString("JBSWY3DPEHPK3PXP"); // -> '48656c6c6f21deadbeef'