Ascii armror doc

This commit is contained in:
Dominik Schürmann 2013-09-09 19:55:35 +02:00
parent bf1334d6c0
commit 4ca7a12751
5 changed files with 16 additions and 5 deletions

View File

@ -31,6 +31,8 @@ interface ICryptoService {
* Byte array you want to encrypt * Byte array you want to encrypt
* @param encryptionUserIds * @param encryptionUserIds
* User Ids (emails) of recipients * User Ids (emails) of recipients
* @param asciiArmor
* Encode for ASCII (Radix-64, 33 percent overhead compared to binary)
* @param callback * @param callback
* Callback where to return results * Callback where to return results
*/ */
@ -41,6 +43,8 @@ interface ICryptoService {
* *
* @param inputBytes * @param inputBytes
* Byte array you want to encrypt * Byte array you want to encrypt
* @param asciiArmor
* Encode for ASCII (Radix-64, 33 percent overhead compared to binary)
* @param callback * @param callback
* Callback where to return results * Callback where to return results
*/ */
@ -55,6 +59,8 @@ interface ICryptoService {
* User Ids (emails) of recipients * User Ids (emails) of recipients
* @param signatureUserId * @param signatureUserId
* User Ids (email) of sender * User Ids (email) of sender
* @param asciiArmor
* Encode for ASCII (Radix-64, 33 percent overhead compared to binary)
* @param callback * @param callback
* Callback where to return results * Callback where to return results
*/ */

View File

@ -20,7 +20,7 @@ import android.os.Parcel;
import android.os.Parcelable; import android.os.Parcelable;
public class CryptoError implements Parcelable { public class CryptoError implements Parcelable {
public static final int ID_NO_WRONG_PASSPHRASE = 1; public static final int ID_NO_OR_WRONG_PASSPHRASE = 1;
public static final int ID_NO_USER_IDS = 2; public static final int ID_NO_USER_IDS = 2;
int errorId; int errorId;

View File

@ -27,6 +27,5 @@ interface ICryptoCallback {
*/ */
oneway void onSuccess(in byte[] outputBytes, in CryptoSignatureResult signatureResult); oneway void onSuccess(in byte[] outputBytes, in CryptoSignatureResult signatureResult);
oneway void onError(in CryptoError error); oneway void onError(in CryptoError error);
} }

View File

@ -31,6 +31,8 @@ interface ICryptoService {
* Byte array you want to encrypt * Byte array you want to encrypt
* @param encryptionUserIds * @param encryptionUserIds
* User Ids (emails) of recipients * User Ids (emails) of recipients
* @param asciiArmor
* Encode for ASCII (Radix-64, 33 percent overhead compared to binary)
* @param callback * @param callback
* Callback where to return results * Callback where to return results
*/ */
@ -41,6 +43,8 @@ interface ICryptoService {
* *
* @param inputBytes * @param inputBytes
* Byte array you want to encrypt * Byte array you want to encrypt
* @param asciiArmor
* Encode for ASCII (Radix-64, 33 percent overhead compared to binary)
* @param callback * @param callback
* Callback where to return results * Callback where to return results
*/ */
@ -55,6 +59,8 @@ interface ICryptoService {
* User Ids (emails) of recipients * User Ids (emails) of recipients
* @param signatureUserId * @param signatureUserId
* User Ids (email) of sender * User Ids (email) of sender
* @param asciiArmor
* Encode for ASCII (Radix-64, 33 percent overhead compared to binary)
* @param callback * @param callback
* Callback where to return results * Callback where to return results
*/ */

View File

@ -274,7 +274,7 @@ public class CryptoService extends Service {
if (sign) { if (sign) {
String passphrase = getCachedPassphrase(appSettings.getKeyId()); String passphrase = getCachedPassphrase(appSettings.getKeyId());
if (passphrase == null) { if (passphrase == null) {
callback.onError(new CryptoError(CryptoError.ID_NO_WRONG_PASSPHRASE, callback.onError(new CryptoError(CryptoError.ID_NO_OR_WRONG_PASSPHRASE,
"No or wrong passphrase!")); "No or wrong passphrase!"));
return; return;
} }
@ -322,7 +322,7 @@ public class CryptoService extends Service {
String passphrase = getCachedPassphrase(appSettings.getKeyId()); String passphrase = getCachedPassphrase(appSettings.getKeyId());
if (passphrase == null) { if (passphrase == null) {
callback.onError(new CryptoError(CryptoError.ID_NO_WRONG_PASSPHRASE, callback.onError(new CryptoError(CryptoError.ID_NO_OR_WRONG_PASSPHRASE,
"No or wrong passphrase!")); "No or wrong passphrase!"));
return; return;
} }
@ -404,7 +404,7 @@ public class CryptoService extends Service {
String passphrase = getCachedPassphrase(secretKeyId); String passphrase = getCachedPassphrase(secretKeyId);
if (passphrase == null) { if (passphrase == null) {
callback.onError(new CryptoError(CryptoError.ID_NO_WRONG_PASSPHRASE, callback.onError(new CryptoError(CryptoError.ID_NO_OR_WRONG_PASSPHRASE,
"No or wrong passphrase!")); "No or wrong passphrase!"));
return; return;
} }