Skip to content

Commit

Permalink
Update SpongyCastle version
Browse files Browse the repository at this point in the history
  • Loading branch information
bentglasstube committed Jul 19, 2013
1 parent fee6cf4 commit 6e3806e
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
Binary file removed libs/bcprov-jdk16-146.jar
Binary file not shown.
Binary file added libs/sc-bzip2-1.47.0.2.jar
Binary file not shown.
Binary file added libs/sc-light-jdk15on-1.47.0.2.jar
Binary file not shown.
Binary file added libs/scpg-jdk15on-1.47.0.2.jar
Binary file not shown.
Binary file added libs/scprov-jdk15on-1.47.0.2.jar
Binary file not shown.
20 changes: 10 additions & 10 deletions src/org/eatabrick/vecna/Vecna.java
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public class Vecna extends ListActivity {
private PasswordEntryAdapter adapter;
private SharedPreferences settings;
private String passphrase = "";

private String extraInformation = "";

private class ReadEntriesTask extends AsyncTask<String, Integer, Integer> {
Expand All @@ -87,7 +87,7 @@ protected void onPreExecute() {
adapter.clear();
adapter.notifyDataSetChanged();
adapter.setNotifyOnChange(false);

extraInformation = "";

progress = new ProgressDialog(Vecna.this);
Expand Down Expand Up @@ -149,14 +149,14 @@ protected Integer doInBackground(String... string) {
dataEncrypted = (PGPPublicKeyEncryptedData) it.next();

keySecret = keyring.getSecretKey(dataEncrypted.getKeyID());
keyPrivate = keySecret.extractPrivateKey(string[0].toCharArray(), "BC");
keyPrivate = keySecret.extractPrivateKey(string[0].toCharArray(), "SC");
}

if (keyPrivate == null) return R.string.error_secret_key_missing;

publishProgress(R.string.progress_decrypt);

factory = new PGPObjectFactory(dataEncrypted.getDataStream(keyPrivate, "BC"));
factory = new PGPObjectFactory(dataEncrypted.getDataStream(keyPrivate, "SC"));
Object message = factory.nextObject();

if (message instanceof PGPCompressedData) {
Expand Down Expand Up @@ -184,10 +184,10 @@ protected Integer doInBackground(String... string) {
}
} catch (PGPException e) {
e.printStackTrace();
if (e.getCause() instanceof NoSuchAlgorithmException) {
extraInformation = e.getCause().getLocalizedMessage();
return R.string.error_algorithm;
}
if (e.getCause() instanceof NoSuchAlgorithmException) {
extraInformation = e.getCause().getLocalizedMessage();
return R.string.error_algorithm;
}
return R.string.error_pgp_key;
} catch (Exception e) {
e.printStackTrace();
Expand Down Expand Up @@ -342,8 +342,8 @@ protected void onListItemLongClick(AdapterView parent, View v, int pos, long id)

builder.setPositiveButton(R.string.show_entry_copy, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
ClipData clip = ClipData.newPlainText("password", entry.password);
((ClipboardManager) getSystemService(CLIPBOARD_SERVICE)).setPrimaryClip(clip);
ClipData clip = ClipData.newPlainText("password", entry.password);
((ClipboardManager) getSystemService(CLIPBOARD_SERVICE)).setPrimaryClip(clip);
Toast.makeText(Vecna.this, getString(R.string.copied, entry.account), Toast.LENGTH_SHORT).show();
}
});
Expand Down

0 comments on commit 6e3806e

Please sign in to comment.