
This library contains implementations of fast and error resilient codecs in pure Dart.
Type |
Available |
Class |
BinaryCodec |
Constants |
base2 |
Methods |
fromBinary , toBinary |
Type |
Available |
Class |
B16Codec |
Constants |
base16 , base16lower |
Methods |
fromHex , toHex |
Type |
Available |
Class |
B32Codec |
Constants |
base32 , base32lower , base32padded , base32paddedlower |
Methods |
fromBase32 , toBase32 |
Type |
Available |
Class |
B64Codec |
Constants |
base64 , base64padded |
Methods |
fromBase64 , toBase64 |
Type |
Available |
Class |
B64URLCodec |
Constants |
base64url , base64urlpadded |
Methods |
fromBase64Url , toBase64Url |
Type |
Available |
Class |
ASCIICodec |
Constants |
ascii |
Methods |
fromAscii , toAscii |
The following import will give you access to all of the algorithms in this package.
import 'package:hashlib_codecs/hashlib_codecs.dart';
Check the API Reference for details.
Examples can be found inside the example
folder.
import 'package:hashlib_codecs/hashlib_codecs.dart';
void main() {
var input = [0x3, 0xF1];
print("input => $input");
print('');
print("binary => ${toBinary(input)}");
print("binary (no padding) => ${toBinary(input, padding: false)}");
print('');
print("hexadecimal => ${toHex(input)}");
print("hexadecimal (uppercase) => ${toHex(input, upper: true)}");
print("hexadecimal (no padding) => ${toHex(input, padding: false)}");
print('');
print("base32 => ${toBase32(input)}");
print("base32 (lowercase) => ${toBase32(input, upper: false)}");
print("base32 (no padding) => ${toBase32(input, padding: false)}");
print('');
print("base64 => ${toBase64(input)}");
print("base64 (no padding) => ${toBase64(input, padding: false)}");
print('');
print("base64url => ${toBase64Url(input)}");
print("base64url (no padding) => ${toBase64Url(input, padding: false)}");
print('');
}