Skip to main content

is_logbook 0.3.2 copy "is_logbook: ^0.3.2" to clipboard
is_logbook: ^0.3.2 copied to clipboard

An add-only logbook of bytes: each entry chained to the one before it, naming the bytes and the hash of the code that wrote it.

example/is_logbook_example.dart

import 'dart:convert';
import 'dart:io';

import 'package:is_logbook/is_logbook.dart';

void main() {
  final dir = Directory.systemTemp.createTempSync('logbook');
  final logbook = Logbook.open(dir);
  if (logbook == null) {
    print('this build has no source for the logbook to hash');
    return;
  }
  final checked = logbook.approved().contains(logbook.codeHash);
  print('code ${logbook.codeHash} is ${checked ? 'approved' : 'unreviewed'}');

  final id = logbook.add(utf8.encode('hello'));
  print('stored as $id');
  print('read back: ${utf8.decode(logbook.get(id)!)}');
  print('logbook intact: ${logbook.check() is Intact}');
  logbook.close();
}
0
likes
0
points
634
downloads

Publisher

unverified uploader

Weekly Downloads

An add-only logbook of bytes: each entry chained to the one before it, naming the bytes and the hash of the code that wrote it.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

is_content_id, is_logbook_format, is_unix_socket_user_check

More

Packages that depend on is_logbook