content: // This file is automatically generated, so please do not edit it.
  // @generated by `flutter_rust_bridge`@ 2.10.0.
  
  // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import
  
  import 'frb_generated.dart';
  import 'package:collection/collection.dart';
  import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart';
  
  // These functions are ignored because they are not marked as `pub`: `blake3_digest`, `hash_bao_file_internal`, `new`
  // These types are ignored because they are neither used by any `pub` functions nor (for structs and enums) marked `#[frb(unignore)]`: `FakeSeeker`
  // These function are ignored because they are on traits that is not defined in current crate (put an empty `#[frb]` on it to unignore): `read`, `seek`
  
  Future<Uint8List> encryptXchacha20Poly1305(
          {required List<int> key,
          required List<int> nonce,
          required List<int> plaintext}) =>
      RustLib.instance.api.crateApiEncryptXchacha20Poly1305(
          key: key, nonce: nonce, plaintext: plaintext);
  
  Future<Uint8List> decryptXchacha20Poly1305(
          {required List<int> key,
          required List<int> nonce,
          required List<int> ciphertext}) =>
      RustLib.instance.api.crateApiDecryptXchacha20Poly1305(
          key: key, nonce: nonce, ciphertext: ciphertext);
  
  Future<Uint8List> hashBlake3File({required String path}) =>
      RustLib.instance.api.crateApiHashBlake3File(path: path);
  
  Future<Uint8List> hashBlake3({required List<int> input}) =>
      RustLib.instance.api.crateApiHashBlake3(input: input);
  
  Uint8List hashBlake3Sync({required List<int> input}) =>
      RustLib.instance.api.crateApiHashBlake3Sync(input: input);
  
  Future<int> verifyIntegrity(
          {required List<int> chunkBytes,
          required BigInt offset,
          required List<int> baoOutboardBytes,
          required U8Array32 blake3Hash}) =>
      RustLib.instance.api.crateApiVerifyIntegrity(
          chunkBytes: chunkBytes,
          offset: offset,
          baoOutboardBytes: baoOutboardBytes,
          blake3Hash: blake3Hash);
  
  Future<BaoResult> hashBaoFile({required String path}) =>
      RustLib.instance.api.crateApiHashBaoFile(path: path);
  
  Future<BaoResult> hashBaoMemory({required List<int> bytes}) =>
      RustLib.instance.api.crateApiHashBaoMemory(bytes: bytes);
  
  class BaoResult {
    final Uint8List hash;
    final Uint8List outboard;
  
    const BaoResult({
      required this.hash,
      required this.outboard,
    });
  
    @override
    int get hashCode => hash.hashCode ^ outboard.hashCode;
  
    @override
    bool operator ==(Object other) =>
        identical(this, other) ||
        other is BaoResult &&
            runtimeType == other.runtimeType &&
            hash == other.hash &&
            outboard == other.outboard;
  }
  
  class U8Array32 extends NonGrowableListView<int> {
    static const arraySize = 32;
  
    @internal
    Uint8List get inner => _inner;
    final Uint8List _inner;
  
    U8Array32(this._inner)
        : assert(_inner.length == arraySize),
          super(_inner);
  
    U8Array32.init() : this(Uint8List(arraySize));
  }
  