-
-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
145 changed files
with
3,871 additions
and
1,023 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
app/src/main/java/org/thoughtcrime/securesms/KbsEnclave.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
package org.thoughtcrime.securesms; | ||
|
||
import androidx.annotation.NonNull; | ||
|
||
import java.util.Objects; | ||
|
||
/** | ||
* Used in our {@link BuildConfig} to tie together the various attributes of a KBS instance. This | ||
* is sitting in the root directory so it can be accessed by the build config. | ||
*/ | ||
public final class KbsEnclave { | ||
|
||
private final String enclaveName; | ||
private final String serviceId; | ||
private final String mrEnclave; | ||
|
||
public KbsEnclave(@NonNull String enclaveName, @NonNull String serviceId, @NonNull String mrEnclave) { | ||
this.enclaveName = enclaveName; | ||
this.serviceId = serviceId; | ||
this.mrEnclave = mrEnclave; | ||
} | ||
|
||
public @NonNull String getMrEnclave() { | ||
return mrEnclave; | ||
} | ||
|
||
public @NonNull String getEnclaveName() { | ||
return enclaveName; | ||
} | ||
|
||
public @NonNull String getServiceId() { | ||
return serviceId; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) return true; | ||
if (o == null || getClass() != o.getClass()) return false; | ||
KbsEnclave enclave = (KbsEnclave) o; | ||
return enclaveName.equals(enclave.enclaveName) && | ||
serviceId.equals(enclave.serviceId) && | ||
mrEnclave.equals(enclave.mrEnclave); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(enclaveName, serviceId, mrEnclave); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.