diff options
author | Moxie Marlinspike <moxie@thoughtcrime.org> | 2015-01-08 13:48:49 -0800 |
---|---|---|
committer | Moxie Marlinspike <moxie@thoughtcrime.org> | 2015-01-08 14:09:01 -0800 |
commit | 6445ea5f13850f42c3952bd06a2369317683ed88 (patch) | |
tree | f2bb37c8cf4710ff6a6a37a3e7e702c5a21ca504 /src/main/java/org/whispersystems/libaxolotl/state/IdentityKeyStore.java | |
parent | a4d8f7f6a4c4e9e89db35f299e558dceee2362a1 (diff) |
Break project up into Java and Android build/test.
Diffstat (limited to 'src/main/java/org/whispersystems/libaxolotl/state/IdentityKeyStore.java')
-rw-r--r-- | src/main/java/org/whispersystems/libaxolotl/state/IdentityKeyStore.java | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/src/main/java/org/whispersystems/libaxolotl/state/IdentityKeyStore.java b/src/main/java/org/whispersystems/libaxolotl/state/IdentityKeyStore.java deleted file mode 100644 index d2024f78..00000000 --- a/src/main/java/org/whispersystems/libaxolotl/state/IdentityKeyStore.java +++ /dev/null @@ -1,57 +0,0 @@ -package org.whispersystems.libaxolotl.state; - -import org.whispersystems.libaxolotl.IdentityKey; -import org.whispersystems.libaxolotl.IdentityKeyPair; - -/** - * Provides an interface to identity information. - * - * @author Moxie Marlinspike - */ -public interface IdentityKeyStore { - - /** - * Get the local client's identity key pair. - * - * @return The local client's persistent identity key pair. - */ - public IdentityKeyPair getIdentityKeyPair(); - - /** - * Return the local client's registration ID. - * <p> - * Clients should maintain a registration ID, a random number - * between 1 and 16380 that's generated once at install time. - * - * @return the local client's registration ID. - */ - public int getLocalRegistrationId(); - - /** - * Save a remote client's identity key - * <p> - * Store a remote client's identity key as trusted. - * - * @param recipientId The recipient ID of the remote client. - * @param identityKey The remote client's identity key. - */ - public void saveIdentity(long recipientId, IdentityKey identityKey); - - - /** - * Verify a remote client's identity key. - * <p> - * Determine whether a remote client's identity is trusted. Convention is - * that the TextSecure protocol is 'trust on first use.' This means that - * an identity key is considered 'trusted' if there is no entry for the recipient - * in the local store, or if it matches the saved key for a recipient in the local - * store. Only if it mismatches an entry in the local store is it considered - * 'untrusted.' - * - * @param recipientId The recipient ID of the remote client. - * @param identityKey The identity key to verify. - * @return true if trusted, false if untrusted. - */ - public boolean isTrustedIdentity(long recipientId, IdentityKey identityKey); - -} |