diff options
author | Dominik Schürmann <dominik@dominikschuermann.de> | 2014-02-14 17:26:54 +0100 |
---|---|---|
committer | Dominik Schürmann <dominik@dominikschuermann.de> | 2014-02-14 17:26:54 +0100 |
commit | 21ba41edaec7eb942e0ebe004874a763b9afa638 (patch) | |
tree | 5537eea2d077439b9c691a99459e7c6d183a9655 /OpenPGP-Keychain-API/example-app | |
parent | 02a0a552ad0918b25717cfb39f7399d69655fdbc (diff) | |
download | open-keychain-21ba41edaec7eb942e0ebe004874a763b9afa638.tar.gz open-keychain-21ba41edaec7eb942e0ebe004874a763b9afa638.tar.bz2 open-keychain-21ba41edaec7eb942e0ebe004874a763b9afa638.zip |
request ascii armor
Diffstat (limited to 'OpenPGP-Keychain-API/example-app')
-rw-r--r-- | OpenPGP-Keychain-API/example-app/src/main/java/org/sufficientlysecure/keychain/demo/OpenPgpProviderActivity.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/OpenPGP-Keychain-API/example-app/src/main/java/org/sufficientlysecure/keychain/demo/OpenPgpProviderActivity.java b/OpenPGP-Keychain-API/example-app/src/main/java/org/sufficientlysecure/keychain/demo/OpenPgpProviderActivity.java index b5b4a812e..c4fde3f7e 100644 --- a/OpenPGP-Keychain-API/example-app/src/main/java/org/sufficientlysecure/keychain/demo/OpenPgpProviderActivity.java +++ b/OpenPGP-Keychain-API/example-app/src/main/java/org/sufficientlysecure/keychain/demo/OpenPgpProviderActivity.java @@ -142,6 +142,8 @@ public class OpenPgpProviderActivity extends Activity { public void sign(Bundle params) { + params.putBoolean(OpenPgpConstants.PARAMS_REQUEST_ASCII_ARMOR, true); + InputStream is = getInputstream(false); final ByteArrayOutputStream os = new ByteArrayOutputStream(); @@ -179,6 +181,7 @@ public class OpenPgpProviderActivity extends Activity { public void encrypt(Bundle params) { params.putStringArray(OpenPgpConstants.PARAMS_USER_IDS, mEncryptUserIds.getText().toString().split(",")); + params.putBoolean(OpenPgpConstants.PARAMS_REQUEST_ASCII_ARMOR, true); InputStream is = getInputstream(false); final ByteArrayOutputStream os = new ByteArrayOutputStream(); @@ -217,6 +220,7 @@ public class OpenPgpProviderActivity extends Activity { public void signAndEncrypt(Bundle params) { params.putStringArray(OpenPgpConstants.PARAMS_USER_IDS, mEncryptUserIds.getText().toString().split(",")); + params.putBoolean(OpenPgpConstants.PARAMS_REQUEST_ASCII_ARMOR, true); InputStream is = getInputstream(false); final ByteArrayOutputStream os = new ByteArrayOutputStream(); @@ -254,6 +258,8 @@ public class OpenPgpProviderActivity extends Activity { } public void decryptAndVerify(Bundle params) { + params.putBoolean(OpenPgpConstants.PARAMS_REQUEST_ASCII_ARMOR, true); + InputStream is = getInputstream(true); final ByteArrayOutputStream os = new ByteArrayOutputStream(); @@ -267,7 +273,7 @@ public class OpenPgpProviderActivity extends Activity { Log.d(OpenPgpConstants.TAG, "result: " + os.toByteArray().length + " str=" + os.toString("UTF-8")); - mCiphertext.setText(os.toString("UTF-8")); + mMessage.setText(os.toString("UTF-8")); } catch (UnsupportedEncodingException e) { e.printStackTrace(); } |