2
0

Harmonize C/Java code more, WIP crypt/derive in Java.

This commit is contained in:
Maarten Billemont
2017-09-19 14:52:43 -04:00
parent 473e3ca11f
commit ad00ceb4ce
16 changed files with 207 additions and 73 deletions

View File

@@ -54,7 +54,7 @@ public class EmergencyActivity extends Activity {
private final Preferences preferences = Preferences.get( this );
private final ListeningExecutorService executor = MoreExecutors.listeningDecorator( Executors.newSingleThreadExecutor() );
private final ImmutableList<MPResultType> allResultTypes = ImmutableList.copyOf( MPResultType.forClass( MPResultTypeClass.Generated ) );
private final ImmutableList<MPResultType> allResultTypes = ImmutableList.copyOf( MPResultType.forClass( MPResultTypeClass.Template ) );
private final ImmutableList<MasterKey.Version> allVersions = ImmutableList.copyOf( MasterKey.Version.values() );
private ListenableFuture<MasterKey> masterKeyFuture;
@@ -332,7 +332,7 @@ public class EmergencyActivity extends Activity {
@Override
public void run() {
try {
sitePassword = masterKeyFuture.get().siteResult( siteName, counter, MPKeyPurpose.Password, null, type, null );
sitePassword = masterKeyFuture.get().siteResult( siteName, counter, MPKeyPurpose.Authentication, null, type, null );
runOnUiThread( new Runnable() {
@Override

View File

@@ -148,7 +148,7 @@ public final class Preferences {
@Nonnull
public MPResultType getDefaultResultType() {
return MPResultType.values()[prefs().getInt( PREF_RESULT_TYPE, MPResultType.GeneratedLong.ordinal() )];
return MPResultType.values()[prefs().getInt( PREF_RESULT_TYPE, MPResultType.DEFAULT.ordinal() )];
}
public boolean setDefaultVersion(final MasterKey.Version value) {