// This file is automatically generated, so please do not edit it.
// @generated by `flutter_rust_bridge`@ 2.12.0.

// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import

import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart';
import 'package:localsend_isolates/rust/frb_generated.dart';

Future<void> verifyCert({required String cert, required String publicKey}) =>
    RustLib.instance.api.crateApiCryptoVerifyCert(cert: cert, publicKey: publicKey);

Future<KeyPair> generateKeyPair() => RustLib.instance.api.crateApiCryptoGenerateKeyPair();

class KeyPair {
  final String privateKey;
  final String publicKey;

  const KeyPair({
    required this.privateKey,
    required this.publicKey,
  });

  @override
  int get hashCode => privateKey.hashCode ^ publicKey.hashCode;

  @override
  bool operator ==(Object other) =>
      identical(this, other) ||
      other is KeyPair && runtimeType == other.runtimeType && privateKey == other.privateKey && publicKey == other.publicKey;
}
