@@ -0,0 +1,2151 @@
+%0Apackage com.battlelancer.seriesguide.beta.test;%0A%0Aimport static org.fest.assertions.api.Assertions.assertThat;%0A%0Aimport android.content.SharedPreferences;%0Aimport android.preference.PreferenceManager;%0Aimport android.test.AndroidTestCase;%0A%0Aimport com.battlelancer.seriesguide.ui.SeriesGuidePreferences;%0Aimport com.battlelancer.seriesguide.util.SimpleCrypto;%0Aimport com.battlelancer.seriesguide.util.Utils;%0A%0Aimport java.io.File;%0A%0Apublic class SimpleCryptoTest extends AndroidTestCase %7B%0A%0A    private static final String CLEARTEXT = %22This1s@Passw0rd%22;%0A    private static final String DATACORE = %22datacore%22;%0A%0A    public SimpleCryptoTest() %7B%0A        super();%0A    %7D%0A%0A    @Override%0A    protected void setUp() throws Exception %7B%0A        super.setUp();%0A%0A        // Delete seed%0A        SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext());%0A        prefs.edit().putString(SeriesGuidePreferences.KEY_SECURE, null).commit();%0A%0A        // Delete keystore file%0A        getContext().deleteFile(DATACORE);%0A    %7D%0A%0A    @Override%0A    public void testAndroidTestCaseSetupProperly() %7B%0A        super.testAndroidTestCaseSetupProperly();%0A%0A        SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext());%0A        assertThat(prefs.getString(SeriesGuidePreferences.KEY_SECURE, null)).isNull();%0A%0A        File filesDir = getContext().getFilesDir();%0A        File%5B%5D listFiles = filesDir.listFiles();%0A        for (File file : listFiles) %7B%0A            if (DATACORE.equals(file.getName())) %7B%0A                fail(%22Keystore file still exists.%22);%0A            %7D%0A        %7D%0A    %7D%0A%0A    public void testClearTextEncryption() %7B%0A        String encrypted = SimpleCrypto.encrypt(CLEARTEXT, getContext());%0A%0A        String decrypted = SimpleCrypto.decrypt(encrypted, getContext());%0A%0A        assertThat(decrypted).isEqualTo(CLEARTEXT);%0A    %7D%0A%0A    public void testHashEncryption() %7B%0A        String hash = Utils.toSHA1(CLEARTEXT.getBytes());%0A%0A        String encrypted = SimpleCrypto.encrypt(hash, getContext());%0A%0A        String decrypted = SimpleCrypto.decrypt(encrypted, getContext());%0A%0A        assertThat(decrypted).isEqualTo(hash);%0A    %7D%0A%7D%0A

Add SimpleCrypto test back, rewritten for new implementation.