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);
}
28
likes
140
pub points
86%
popularity

Publisher

verified publisherleushchenko.com

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