feat: Add last features for use in moxxmpp
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import 'dart:convert';
|
||||
import 'package:cryptography/cryptography.dart';
|
||||
import 'package:hex/hex.dart';
|
||||
import 'package:meta/meta.dart';
|
||||
import 'package:omemo_dart/src/crypto.dart';
|
||||
import 'package:omemo_dart/src/double_ratchet/crypto.dart';
|
||||
@@ -251,6 +252,12 @@ class OmemoDoubleRatchet {
|
||||
'kex': kex,
|
||||
};
|
||||
}
|
||||
|
||||
/// Returns the OMEMO compatible fingerprint of the ratchet session.
|
||||
Future<String> getOmemoFingerprint() async {
|
||||
final curveKey = await ik.toCurve25519();
|
||||
return HEX.encode(await curveKey.getBytes());
|
||||
}
|
||||
|
||||
Future<List<int>?> _trySkippedMessageKeys(OmemoMessage header, List<int> ciphertext) async {
|
||||
final key = SkippedKey(
|
||||
|
||||
Reference in New Issue
Block a user