hashids2 2.0.0 copy "hashids2: ^2.0.0" to clipboard
hashids2: ^2.0.0 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.

example/main.dart

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);
}
29
likes
160
points
3.02k
downloads

Publisher

verified publisherleushchenko.com

Weekly Downloads

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.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

More

Packages that depend on hashids2