feat(useragent): initial connection impl
This commit is contained in:
16
useragent/lib/features/identity/pk_manager.dart
Normal file
16
useragent/lib/features/identity/pk_manager.dart
Normal file
@@ -0,0 +1,16 @@
|
||||
enum KeyAlgorithm {
|
||||
rsa, ecdsa, ed25519
|
||||
}
|
||||
|
||||
// The API to handle without storing the private key in memory.
|
||||
//The implementation will use platform-specific secure storage and signing capabilities.
|
||||
abstract class KeyHandle {
|
||||
KeyAlgorithm get alg;
|
||||
Future<List<int>> sign(List<int> data);
|
||||
Future<List<int>> getPublicKey();
|
||||
}
|
||||
|
||||
abstract class KeyManager {
|
||||
Future<KeyHandle?> get();
|
||||
Future<KeyHandle> create();
|
||||
}
|
||||
Reference in New Issue
Block a user