Testing encrypt by service
This commit is contained in:
1 parent
fabb0389fc
commit
3a66c1c25a
4 files changed
+83
-30
No files matched your search
+19
-4
@@ -73,11 +73,18 @@ public class CryptoProviderDemoActivity extends Activity {
|
||||
final ICryptoCallback.Stub encryptCallback = new ICryptoCallback.Stub() {
|
||||
|
||||
@Override
|
||||
public void onSuccess(byte[] outputBytes, CryptoSignatureResult signatureResult)
|
||||
public void onSuccess(final byte[] outputBytes, CryptoSignatureResult signatureResult)
|
||||
throws RemoteException {
|
||||
Log.d(Constants.TAG, "onEncryptSignSuccess");
|
||||
|
||||
// TODO
|
||||
runOnUiThread(new Runnable() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
mCiphertext.setText(new String(outputBytes));
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -91,11 +98,19 @@ public class CryptoProviderDemoActivity extends Activity {
|
||||
final ICryptoCallback.Stub decryptCallback = new ICryptoCallback.Stub() {
|
||||
|
||||
@Override
|
||||
public void onSuccess(byte[] outputBytes, CryptoSignatureResult signatureResult)
|
||||
public void onSuccess(final byte[] outputBytes, final CryptoSignatureResult signatureResult)
|
||||
throws RemoteException {
|
||||
Log.d(Constants.TAG, "onDecryptVerifySuccess");
|
||||
|
||||
mMessage.setText(new String(outputBytes));
|
||||
runOnUiThread(new Runnable() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
mMessage.setText(new String(outputBytes) + "\n\n" + signatureResult.toString());
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user