@@ -20,21 +20,34 @@ This library contains implementations of fast and error resilient codecs in pure
2020| Class | ` Base2Codec ` |
2121| Methods | ` fromBinary ` , ` toBinary ` |
2222
23+ Available codecs:
24+
25+ - ** standard** : ` 01 ` (default)
26+
2327### Octal (Base-8)
2428
2529| Type | Available |
2630| ------- | ---------------------- |
2731| Class | ` Base8Codec ` |
2832| Methods | ` fromOctal ` , ` toOctal ` |
2933
34+ Available codecs:
35+
36+ - ** standard** : ` 012345678 ` (default)
37+
3038### Hexadecimal (Base-16)
3139
3240| Type | Available |
3341| ------- | ------------------ |
3442| Class | ` Base16Codec ` |
3543| Methods | ` fromHex ` , ` toHex ` |
3644
37- ### Base-32 (RFC-4648)
45+ Available codecs:
46+
47+ - ** upper** : ` 0123456789ABCDEF ` (default)
48+ - ** lower** : ` 0123456789abcdef `
49+
50+ ### Base-32
3851
3952> Supports conversion without padding
4053
@@ -43,7 +56,17 @@ This library contains implementations of fast and error resilient codecs in pure
4356| Class | ` Base32Codec ` |
4457| Methods | ` fromBase32 ` , ` toBase32 ` |
4558
46- ### Base-64 (RFC-4648)
59+ Available codecs:
60+
61+ - ** standard** (RFC-4648): ` ABCDEFGHIJKLMNOPQRSTUVWXYZ234567 ` (default)
62+ - ** lowercase** : ` abcdefghijklmnopqrstuvwxyz234567 `
63+ - ** hex** : ` 0123456789ABCDEFGHIJKLMNOPQRSTUV `
64+ - ** hexLower** : ` 0123456789abcdefghijklmnopqrstuv `
65+ - ** crockford** : ` 0123456789bcdefghjkmnpqrstuvwxyz `
66+ - ** z** : ` ybndrfg8ejkmcpqxot1uwisza345h769 `
67+ - ** wordSafe** : ` 23456789CFGHJMPQRVWXcfghjmpqrvwx `
68+
69+ ### Base-64
4770
4871> Supports conversion without padding, and <br >
4972> the URL/Filename-safe Base64 conversion.
@@ -53,6 +76,11 @@ This library contains implementations of fast and error resilient codecs in pure
5376| Class | ` Base64Codec ` |
5477| Methods | ` fromBase64 ` , ` toBase64 ` |
5578
79+ Available codecs:
80+
81+ - ** standard** (RFC-4648): ` ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/ ` (default)
82+ - ** urlSafe** : ` ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_ `
83+
5684### BigInt
5785
5886> Supports both the Big-Endian and Little-Endian conversion
@@ -62,6 +90,11 @@ This library contains implementations of fast and error resilient codecs in pure
6290| Class | ` BigIntCodec ` |
6391| Methods | ` fromBigInt ` , ` toBigInt ` |
6492
93+ Available codecs:
94+
95+ - ** msbFirst** : treats the input bytes in big-endian order
96+ - ** lsbFirst** : treats the input bytes in little-endian order
97+
6598## Getting Started
6699
67100The following import will give you access to all of the algorithms in this package.
@@ -70,7 +103,7 @@ The following import will give you access to all of the algorithms in this packa
70103import 'package:hashlib_codecs/hashlib_codecs.dart';
71104```
72105
73- Check the [ API Reference] ( https://pub.dev/documentation/hashlib_codecs/latest/ ) for details.
106+ Check the [ API Reference] ( https://pub.dev/documentation/hashlib_codecs/latest/hashlib_codecs/hashlib_codecs-library.html ) for details.
74107
75108## Usage
76109
@@ -80,26 +113,33 @@ Examples can be found inside the `example` folder.
80113import 'package:hashlib_codecs/hashlib_codecs.dart';
81114
82115void main() {
83- var input = [0x3, 0xF1];
84- print("input => $input");
116+ var inp = [0x3, 0xF1];
117+ print("input => $inp");
118+ print('');
119+
120+ print("binary => ${toBinary(inp)}");
85121 print('');
86122
87- print("binary => ${toBinary(input)}");
88- print("binary (no padding) => ${toBinary(input, padding: false)}");
123+ print("octal => ${toOctal(inp)}");
89124 print('');
90125
91- print("hexadecimal => ${toHex(input )}");
92- print("hexadecimal (uppercase) => ${toHex(input , upper: true)}");
126+ print("hexadecimal => ${toHex(inp )}");
127+ print("hexadecimal (uppercase) => ${toHex(inp , upper: true)}");
93128 print('');
94129
95- print("base32 => ${toBase32(input)}");
96- print("base32 (lowercase) => ${toBase32(input, lower: true)}");
97- print("base32 (no padding) => ${toBase32(input, padding: false)}");
130+ print("base32 => ${toBase32(inp)}");
131+ print("base32 (lowercase) => ${toBase32(inp, lower: true)}");
132+ print("base32 (no padding) => ${toBase32(inp, padding: false)}");
133+ print("base32 (hex) => ${toBase32(inp, codec: Base32Codec.hex)}");
134+ print("base32 (z-base-32) => ${toBase32(inp, codec: Base32Codec.z)}");
135+ print("base32 (geohash) => ${toBase32(inp, codec: Base32Codec.geohash)}");
136+ print("base32 (crockford) => ${toBase32(inp, codec: Base32Codec.crockford)}");
137+ print("base32 (word-safe) => ${toBase32(inp, codec: Base32Codec.wordSafe)}");
98138 print('');
99139
100- print("base64 => ${toBase64(input )}");
101- print("base64url => ${toBase64(input , url: true)}");
102- print("base64 (no padding) => ${toBase64(input , padding: false)}");
140+ print("base64 => ${toBase64(inp )}");
141+ print("base64url => ${toBase64(inp , url: true)}");
142+ print("base64 (no padding) => ${toBase64(inp , padding: false)}");
103143 print('');
104144}
105145```
0 commit comments