diff options
Diffstat (limited to 'OpenPGP-Keychain-API-Demo')
3 files changed, 16 insertions, 4 deletions
diff --git a/OpenPGP-Keychain-API-Demo/res/layout/crypto_provider_demo.xml b/OpenPGP-Keychain-API-Demo/res/layout/crypto_provider_demo.xml index 0579aa643..1c0717d98 100644 --- a/OpenPGP-Keychain-API-Demo/res/layout/crypto_provider_demo.xml +++ b/OpenPGP-Keychain-API-Demo/res/layout/crypto_provider_demo.xml @@ -74,12 +74,12 @@ android:text="Encrypt and Sign" /> <Button - android:id="@+id/crypto_provider_demo_decrypt" + android:id="@+id/crypto_provider_demo_decrypt_and_verify" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_weight="1" android:onClick="decryptAndVerifyOnClick" - android:text="Decrypt" /> + android:text="Decrypt and Verify" /> </LinearLayout> </LinearLayout>
\ No newline at end of file diff --git a/OpenPGP-Keychain-API-Demo/src/org/openintents/crypto/CryptoSignatureResult.java b/OpenPGP-Keychain-API-Demo/src/org/openintents/crypto/CryptoSignatureResult.java index e193b73b3..d3aaa52d9 100644 --- a/OpenPGP-Keychain-API-Demo/src/org/openintents/crypto/CryptoSignatureResult.java +++ b/OpenPGP-Keychain-API-Demo/src/org/openintents/crypto/CryptoSignatureResult.java @@ -73,4 +73,14 @@ public class CryptoSignatureResult implements Parcelable { return new CryptoSignatureResult[size]; } }; + + @Override + public String toString() { + String out = new String(); + out += "signature: " + signature; + out += "\nsignatureSuccess: " + signatureSuccess; + out += "\nsignatureUnknown: " + signatureUnknown; + return out; + } + } diff --git a/OpenPGP-Keychain-API-Demo/src/org/sufficientlysecure/keychain/demo/CryptoProviderDemoActivity.java b/OpenPGP-Keychain-API-Demo/src/org/sufficientlysecure/keychain/demo/CryptoProviderDemoActivity.java index 1189d2cf4..ab5795c1c 100644 --- a/OpenPGP-Keychain-API-Demo/src/org/sufficientlysecure/keychain/demo/CryptoProviderDemoActivity.java +++ b/OpenPGP-Keychain-API-Demo/src/org/sufficientlysecure/keychain/demo/CryptoProviderDemoActivity.java @@ -102,8 +102,10 @@ public class CryptoProviderDemoActivity extends Activity { @Override public void run() { - mMessage.setText(new String(outputBytes) + "\n\n" + signatureResult.toString()); - + mMessage.setText(new String(outputBytes)); + Toast.makeText(CryptoProviderDemoActivity.this, + "signature result:\n" + signatureResult.toString(), Toast.LENGTH_LONG) + .show(); } }); |