diff options
author | hrxi <hrrrxi@gmail.com> | 2023-06-19 14:08:57 +0200 |
---|---|---|
committer | fiaxh <fiaxh@users.noreply.github.com> | 2023-10-06 15:25:12 +0200 |
commit | 6eb1b53e60a12f82c8d47a5824bf9cee954ccdc2 (patch) | |
tree | 13a13ef08fcd74bc1685454730b72693806b76f0 /plugins/signal-protocol/src/simple_spks.vala | |
parent | e2d801b5f74b60c38a75310066c48468c8a4bc93 (diff) | |
download | dino-6eb1b53e60a12f82c8d47a5824bf9cee954ccdc2.tar.gz dino-6eb1b53e60a12f82c8d47a5824bf9cee954ccdc2.zip |
Merge `signal-protocol` into `omemo` plugin
Same reasoning as for the `openpgp` plugin.
Diffstat (limited to 'plugins/signal-protocol/src/simple_spks.vala')
-rw-r--r-- | plugins/signal-protocol/src/simple_spks.vala | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/plugins/signal-protocol/src/simple_spks.vala b/plugins/signal-protocol/src/simple_spks.vala deleted file mode 100644 index f0fe09ab..00000000 --- a/plugins/signal-protocol/src/simple_spks.vala +++ /dev/null @@ -1,33 +0,0 @@ -using Gee; - -namespace Signal { - -public class SimpleSignedPreKeyStore : SignedPreKeyStore { - private Map<uint32, SignedPreKeyStore.Key> pre_key_map = new HashMap<uint32, SignedPreKeyStore.Key>(); - - public override uint8[]? load_signed_pre_key(uint32 pre_key_id) throws Error { - if (contains_signed_pre_key(pre_key_id)) { - return pre_key_map[pre_key_id].record; - } - return null; - } - - public override void store_signed_pre_key(uint32 pre_key_id, uint8[] record) throws Error { - SignedPreKeyStore.Key key = new Key(pre_key_id, record); - pre_key_map[pre_key_id] = key; - signed_pre_key_stored(key); - } - - public override bool contains_signed_pre_key(uint32 pre_key_id) throws Error { - return pre_key_map.has_key(pre_key_id); - } - - public override void delete_signed_pre_key(uint32 pre_key_id) throws Error { - SignedPreKeyStore.Key key; - if (pre_key_map.unset(pre_key_id, out key)) { - signed_pre_key_deleted(key); - } - } -} - -}
\ No newline at end of file |