Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b719546c authored by Dmitry Dementyev's avatar Dmitry Dementyev
Browse files

Rename createSHA256Parameters to createSha256Parameters

Fixes the following lint warning:
Warning S1: Method names with acronyms should be getMtu() instead of
getMTU()

Bug: 66499222
Test: adb shell am instrument -w -e package \
com.android.server.locksettings.recoverablekeystore \
com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner

Change-Id: If9eb03e2a2a63fe02a2da4828bd0c5c8997078b9
parent df86ddb3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -60,7 +60,7 @@ public final class KeyDerivationParameters implements Parcelable {
    /**
     * Creates instance of the class to to derive key using salted SHA256 hash.
     */
    public static KeyDerivationParameters createSHA256Parameters(@NonNull byte[] salt) {
    public static KeyDerivationParameters createSha256Parameters(@NonNull byte[] salt) {
        return new KeyDerivationParameters(ALGORITHM_SHA256, salt);
    }

+1 −1
Original line number Diff line number Diff line
@@ -221,7 +221,7 @@ public class KeySyncTask implements Runnable {
        KeyStoreRecoveryMetadata metadata = new KeyStoreRecoveryMetadata(
                /*userSecretType=*/ TYPE_LOCKSCREEN,
                /*lockScreenUiFormat=*/ mCredentialType,
                /*keyDerivationParameters=*/ KeyDerivationParameters.createSHA256Parameters(salt),
                /*keyDerivationParameters=*/ KeyDerivationParameters.createSha256Parameters(salt),
                /*secret=*/ new byte[0]);
        ArrayList<KeyStoreRecoveryMetadata> metadataList = new ArrayList<>();
        metadataList.add(metadata);
+7 −7
Original line number Diff line number Diff line
@@ -213,7 +213,7 @@ public class RecoverableKeyStoreManagerTest {
                        new KeyStoreRecoveryMetadata(
                                TYPE_LOCKSCREEN,
                                TYPE_PASSWORD,
                                KeyDerivationParameters.createSHA256Parameters(TEST_SALT),
                                KeyDerivationParameters.createSha256Parameters(TEST_SALT),
                                TEST_SECRET)));

        verify(mMockContext, times(1))
@@ -232,7 +232,7 @@ public class RecoverableKeyStoreManagerTest {
                        new KeyStoreRecoveryMetadata(
                                TYPE_LOCKSCREEN,
                                TYPE_PASSWORD,
                                KeyDerivationParameters.createSHA256Parameters(TEST_SALT),
                                KeyDerivationParameters.createSha256Parameters(TEST_SALT),
                                TEST_SECRET)));

        assertEquals(1, mRecoverySessionStorage.size());
@@ -269,7 +269,7 @@ public class RecoverableKeyStoreManagerTest {
                            new KeyStoreRecoveryMetadata(
                                    TYPE_LOCKSCREEN,
                                    TYPE_PASSWORD,
                                    KeyDerivationParameters.createSHA256Parameters(TEST_SALT),
                                    KeyDerivationParameters.createSha256Parameters(TEST_SALT),
                                    TEST_SECRET)));
            fail("should have thrown");
        } catch (ServiceSpecificException e) {
@@ -291,7 +291,7 @@ public class RecoverableKeyStoreManagerTest {
                            new KeyStoreRecoveryMetadata(
                                    TYPE_LOCKSCREEN,
                                    TYPE_PASSWORD,
                                    KeyDerivationParameters.createSHA256Parameters(TEST_SALT),
                                    KeyDerivationParameters.createSha256Parameters(TEST_SALT),
                                    TEST_SECRET)));
            fail("should have thrown");
        } catch (ServiceSpecificException e) {
@@ -324,7 +324,7 @@ public class RecoverableKeyStoreManagerTest {
                ImmutableList.of(new KeyStoreRecoveryMetadata(
                        TYPE_LOCKSCREEN,
                        TYPE_PASSWORD,
                        KeyDerivationParameters.createSHA256Parameters(TEST_SALT),
                        KeyDerivationParameters.createSha256Parameters(TEST_SALT),
                        TEST_SECRET)));

        try {
@@ -348,7 +348,7 @@ public class RecoverableKeyStoreManagerTest {
                ImmutableList.of(new KeyStoreRecoveryMetadata(
                        TYPE_LOCKSCREEN,
                        TYPE_PASSWORD,
                        KeyDerivationParameters.createSHA256Parameters(TEST_SALT),
                        KeyDerivationParameters.createSha256Parameters(TEST_SALT),
                        TEST_SECRET)));
        byte[] keyClaimant = mRecoverySessionStorage.get(Binder.getCallingUid(), TEST_SESSION_ID)
                .getKeyClaimant();
@@ -380,7 +380,7 @@ public class RecoverableKeyStoreManagerTest {
                ImmutableList.of(new KeyStoreRecoveryMetadata(
                        TYPE_LOCKSCREEN,
                        TYPE_PASSWORD,
                        KeyDerivationParameters.createSHA256Parameters(TEST_SALT),
                        KeyDerivationParameters.createSha256Parameters(TEST_SALT),
                        TEST_SECRET)));
        byte[] keyClaimant = mRecoverySessionStorage.get(Binder.getCallingUid(), TEST_SESSION_ID)
                .getKeyClaimant();