gg_hash 1.1.0 copy "gg_hash: ^1.1.0" to clipboard
gg_hash: ^1.1.0 copied to clipboard

A simple FNV-1 hash implementation used across multiple projects within our organization.

example/gg_hash_example.dart

import 'dart:convert';

import 'package:gg_hash/gg_hash.dart';

void main() {
  /// Print an example of the FNV-1 hash function.
  print(fnv1(['a', 'b', 'c'])); // 6619819810309098008

  /// Add hashes to a JSON object.
  final hashedJson = hashJson({
    'a': 1,
    'b': 2,
    'c': {'d': 3, 'e': 4},
  });

  // Print the JSON object with the added hashes.
  JsonEncoder encoder = const JsonEncoder.withIndent('  ');
  print(encoder.convert(hashedJson));
}
1
likes
160
points
1.81k
downloads

Documentation

API reference

Publisher

verified publisherinlavigo.com

Weekly Downloads

A simple FNV-1 hash implementation used across multiple projects within our organization.

Repository (GitHub)
View/report issues

License

MIT (license)

More

Packages that depend on gg_hash