feat: Remove serialization code

This commit is contained in:
2023-06-15 18:11:35 +02:00
parent 6c301ab88f
commit 6e734ec0c3
4 changed files with 6 additions and 276 deletions

View File

@@ -56,28 +56,6 @@ OmemoPublicKey? decodeKeyIfNotNull(
);
}
List<int>? base64DecodeIfNotNull(Map<String, dynamic> map, String key) {
if (map[key] == null) return null;
return base64.decode(map[key]! as String);
}
String? base64EncodeIfNotNull(List<int>? bytes) {
if (bytes == null) return null;
return base64.encode(bytes);
}
OmemoKeyPair? decodeKeyPairIfNotNull(String? pk, String? sk, KeyPairType type) {
if (pk == null || sk == null) return null;
return OmemoKeyPair.fromBytes(
base64.decode(pk),
base64.decode(sk),
type,
);
}
int getTimestamp() {
return DateTime.now().millisecondsSinceEpoch;
}