Projects >> android_libcore >>c1bc85170c38a540bffeb59f951ad84ee3bd042a

Chunk
Conflicting content
                        (byte)0x83, (byte)0x7c, (byte)0x14, (byte)0x1f,
                        (byte)0xf6, (byte)0x4a, (byte)0xb0, (byte)0x54
                    };
<<<<<<< HEAD
        test_PBKDF2(PASSWORD, SALT, ITERATIONS, KEY_LENGTH, expected);
        test_BrokenPBKDF2(PASSWORD, SALT, ITERATIONS, KEY_LENGTH, expected);
=======
        test_PBKDF2_UTF8(PASSWORD, SALT, ITERATIONS, KEY_LENGTH, expected);
        test_PBKDF2_8BIT(PASSWORD, SALT, ITERATIONS, KEY_LENGTH, expected);
>>>>>>> 07064a72e165536c708ceffe5b4d59bfffd25d5d
    }

    /**
Solution content
                        (byte)0x83, (byte)0x7c, (byte)0x14, (byte)0x1f,
                        (byte)0xf6, (byte)0x4a, (byte)0xb0, (byte)0x54
                    };
        test_PBKDF2_UTF8(PASSWORD, SALT, ITERATIONS, KEY_LENGTH, expected);
        test_PBKDF2_8BIT(PASSWORD, SALT, ITERATIONS, KEY_LENGTH, expected);
    }

    /**
File
SecretKeyFactoryTest.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
            (byte)0xD1, (byte)0xDA, (byte)0xA7, (byte)0x86,
            (byte)0x15, (byte)0xF2, (byte)0x87, (byte)0xE6
        };
<<<<<<< HEAD
        test_PBKDF2(password, salt, iterations, keyLength, expected);
        test_BrokenPBKDF2(password, salt, iterations, keyLength, expected);
=======
        test_PBKDF2_UTF8(password, salt, iterations, keyLength, expected);
        test_PBKDF2_8BIT(password, salt, iterations, keyLength, expected);
>>>>>>> 07064a72e165536c708ceffe5b4d59bfffd25d5d
    }

    /**
Solution content
            (byte)0xD1, (byte)0xDA, (byte)0xA7, (byte)0x86,
            (byte)0x15, (byte)0xF2, (byte)0x87, (byte)0xE6
        };
        test_PBKDF2_UTF8(password, salt, iterations, keyLength, expected);
        test_PBKDF2_8BIT(password, salt, iterations, keyLength, expected);
    }

    /**
File
SecretKeyFactoryTest.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
            (byte)0x85, (byte)0x10, (byte)0x85, (byte)0x86, (byte)0x07, (byte)0x12,
            (byte)0x63, (byte)0x80, (byte)0xcc, (byte)0x47, (byte)0xab, (byte)0x2d
        };
<<<<<<< HEAD
        test_PBKDF2(password, salt, iterations, keyLength, expected);
        test_BrokenPBKDF2(password, salt, iterations, keyLength, expected);
=======
        test_PBKDF2_UTF8(password, salt, iterations, keyLength, expected);
        test_PBKDF2_8BIT(password, salt, iterations, keyLength, expected);
>>>>>>> 07064a72e165536c708ceffe5b4d59bfffd25d5d
    }

   /**
Solution content
            (byte)0x85, (byte)0x10, (byte)0x85, (byte)0x86, (byte)0x07, (byte)0x12,
            (byte)0x63, (byte)0x80, (byte)0xcc, (byte)0x47, (byte)0xab, (byte)0x2d
        };
        test_PBKDF2_UTF8(password, salt, iterations, keyLength, expected);
        test_PBKDF2_8BIT(password, salt, iterations, keyLength, expected);
    }

   /**
File
SecretKeyFactoryTest.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
        byte[] salt = "salt".getBytes();
        int iterations = 4096;
        int keyLength = 160;
<<<<<<< HEAD
        byte[] expected = new byte[] {
=======
        byte[] expected_utf8 = new byte[] {
>>>>>>> 07064a72e165536c708ceffe5b4d59bfffd25d5d
            (byte)0x4c, (byte)0xe0, (byte)0x6a, (byte)0xb8, (byte)0x48, (byte)0x04,
            (byte)0xb7, (byte)0xe7, (byte)0x72, (byte)0xf2, (byte)0xaf, (byte)0x5e,
            (byte)0x54, (byte)0xe9, (byte)0x03, (byte)0xad, (byte)0x59, (byte)0x64,
Solution content
        byte[] salt = "salt".getBytes();
        int iterations = 4096;
        int keyLength = 160;
        byte[] expected_utf8 = new byte[] {
            (byte)0x4c, (byte)0xe0, (byte)0x6a, (byte)0xb8, (byte)0x48, (byte)0x04,
            (byte)0xb7, (byte)0xe7, (byte)0x72, (byte)0xf2, (byte)0xaf, (byte)0x5e,
            (byte)0x54, (byte)0xe9, (byte)0x03, (byte)0xad, (byte)0x59, (byte)0x64,
File
SecretKeyFactoryTest.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
            (byte)0x54, (byte)0xe9, (byte)0x03, (byte)0xad, (byte)0x59, (byte)0x64,
            (byte)0x8b, (byte)0xab
        };
<<<<<<< HEAD
        byte[] brokenExpected = new byte[] {
=======
        byte[] expected_8bit = new byte[] {
>>>>>>> 07064a72e165536c708ceffe5b4d59bfffd25d5d
            (byte)0x6e, (byte)0x43, (byte)0xe0, (byte)0x18, (byte)0xc5, (byte)0x50,
            (byte)0x0d, (byte)0xa7, (byte)0xfe, (byte)0x7a, (byte)0x44, (byte)0x4d,
            (byte)0x99, (byte)0x5d, (byte)0x8c, (byte)0xae, (byte)0xc1, (byte)0xc9,
Solution content
            (byte)0x54, (byte)0xe9, (byte)0x03, (byte)0xad, (byte)0x59, (byte)0x64,
            (byte)0x8b, (byte)0xab
        };
        byte[] expected_8bit = new byte[] {
            (byte)0x6e, (byte)0x43, (byte)0xe0, (byte)0x18, (byte)0xc5, (byte)0x50,
            (byte)0x0d, (byte)0xa7, (byte)0xfe, (byte)0x7a, (byte)0x44, (byte)0x4d,
            (byte)0x99, (byte)0x5d, (byte)0x8c, (byte)0xae, (byte)0xc1, (byte)0xc9,
File
SecretKeyFactoryTest.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
            (byte)0x99, (byte)0x5d, (byte)0x8c, (byte)0xae, (byte)0xc1, (byte)0xc9,
            (byte)0x17, (byte)0xce
        };
<<<<<<< HEAD
        test_PBKDF2(password, salt, iterations, keyLength, expected);
        test_BrokenPBKDF2(password, salt, iterations, keyLength, brokenExpected);
    }

    private void test_BrokenPBKDF2(char[] password, byte[] salt, int iterations, int keyLength,
                             byte[] expected) throws Exception {
        if (!StandardNames.IS_RI) {
            SecretKeyFactory factory = SecretKeyFactory.getInstance("BrokenPBKDF2WithHmacSHA1");
=======
        test_PBKDF2_UTF8(password, salt, iterations, keyLength, expected_utf8);
        test_PBKDF2_8BIT(password, salt, iterations, keyLength, expected_8bit);
    }

    private void test_PBKDF2_8BIT(char[] password, byte[] salt, int iterations, int keyLength,
                                  byte[] expected) throws Exception {
        if (!StandardNames.IS_RI) {
            SecretKeyFactory factory = SecretKeyFactory.getInstance("PBKDF2WithHmacSHA1And8bit");
>>>>>>> 07064a72e165536c708ceffe5b4d59bfffd25d5d
            KeySpec ks = new PBEKeySpec(password, salt, iterations, keyLength);
            SecretKey key = factory.generateSecret(ks);
            assertTrue(Arrays.equals(expected, key.getEncoded()));
Solution content
            (byte)0x99, (byte)0x5d, (byte)0x8c, (byte)0xae, (byte)0xc1, (byte)0xc9,
            (byte)0x17, (byte)0xce
        };
        test_PBKDF2_UTF8(password, salt, iterations, keyLength, expected_utf8);
        test_PBKDF2_8BIT(password, salt, iterations, keyLength, expected_8bit);
    }

    private void test_PBKDF2_8BIT(char[] password, byte[] salt, int iterations, int keyLength,
                                  byte[] expected) throws Exception {
        if (!StandardNames.IS_RI) {
            SecretKeyFactory factory = SecretKeyFactory.getInstance("PBKDF2WithHmacSHA1And8bit");
            KeySpec ks = new PBEKeySpec(password, salt, iterations, keyLength);
            SecretKey key = factory.generateSecret(ks);
            assertTrue(Arrays.equals(expected, key.getEncoded()));
File
SecretKeyFactoryTest.java
Developer's decision
Version 2
Kind of conflict
If statement
Method invocation
Method signature
Variable