hashids2 1.0.1 hashids2: ^1.0.1 copied to clipboard
Hashids is small library to generate YouTube-like ids from numbers. Use Hashids when you do not want to expose your database ids to the user.
import 'package:hashids2/hashids2.dart';
void main() {
final hashids = HashIds(
salt: 'this is my salt',
minHashLength: 8,
alphabet: 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890',
);
final id = hashids.encode([1, 2, 3]);
final numbers = hashids.decode(id);
print(numbers);
}