Files
localsend/app/lib/rust/api/crypto.dart
2026-03-02 03:51:37 +01:00

33 lines
1.0 KiB
Dart

// This file is automatically generated, so please do not edit it.
// @generated by `flutter_rust_bridge`@ 2.11.1.
// 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_app/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;
}