Skip to main content

is_content_id 0.2.0 copy "is_content_id: ^0.2.0" to clipboard
is_content_id: ^0.2.0 copied to clipboard

Content addresses: names made by hashing bytes with sha256, as types, and the sha256 they are made with. No dependencies, and no dart:io.

example/is_content_id_example.dart

import 'dart:convert';

import 'package:is_content_id/is_content_id.dart';

void main() {
  final id = ObjectId.of(utf8.encode('what went up'));
  print('id: $id');
  print('read back from its hex: ${ObjectId.parse(id.hex) == id}');

  final set = FileSetId.of({
    ListedPath.parse('lib/a.dart')!: id,
    ListedPath.parse('README.md')!: ObjectId.of(utf8.encode('# a\n')),
  });
  print('the set: $set');
}
0
likes
160
points
637
downloads

Documentation

API reference

Publisher

verified publisherenspyr.co

Weekly Downloads

Content addresses: names made by hashing bytes with sha256, as types, and the sha256 they are made with. No dependencies, and no dart:io.

Repository (GitHub)
View/report issues

License

Apache-2.0 (license)

More

Packages that depend on is_content_id