feat: Make the replacement functions internal

This commit is contained in:
PapaTutuWawa 2022-08-08 15:10:36 +02:00
parent 43080d2ba0
commit 9626763b44

View File

@ -101,6 +101,7 @@ class Device {
/// This replaces the Onetime-Prekey with id [id] with a completely new one. Returns /// This replaces the Onetime-Prekey with id [id] with a completely new one. Returns
/// a new Device object that copies over everything but replaces said key. /// a new Device object that copies over everything but replaces said key.
@internal
Future<Device> replaceOnetimePrekey(int id) async { Future<Device> replaceOnetimePrekey(int id) async {
opks[id] = await OmemoKeyPair.generateNewPair(KeyPairType.x25519); opks[id] = await OmemoKeyPair.generateNewPair(KeyPairType.x25519);
@ -117,6 +118,7 @@ class Device {
/// This replaces the Signed-Prekey with a completely new one. Returns a new Device object /// This replaces the Signed-Prekey with a completely new one. Returns a new Device object
/// that copies over everything but replaces the Signed-Prekey and its signature. /// that copies over everything but replaces the Signed-Prekey and its signature.
@internal
Future<Device> replaceSignedPrekey() async { Future<Device> replaceSignedPrekey() async {
final newSpk = await OmemoKeyPair.generateNewPair(KeyPairType.x25519); final newSpk = await OmemoKeyPair.generateNewPair(KeyPairType.x25519);
final newSpkId = generateRandom32BitNumber(); final newSpkId = generateRandom32BitNumber();