steps towards symmetric file encryption

This commit is contained in:
Thialfihar
2010-04-23 00:01:59 +00:00
parent 78193007b2
commit ab6c884bdf
6 changed files with 158 additions and 17 deletions

View File

@@ -25,6 +25,7 @@ import java.security.SignatureException;
import java.util.Vector;
import org.bouncycastle2.bcpg.HashAlgorithmTags;
import org.bouncycastle2.openpgp.PGPEncryptedData;
import org.bouncycastle2.openpgp.PGPException;
import org.bouncycastle2.openpgp.PGPPublicKey;
import org.bouncycastle2.openpgp.PGPPublicKeyRing;
@@ -200,7 +201,8 @@ public class EncryptMessageActivity extends BaseActivity {
if (encryptIt) {
Apg.encrypt(in, out, true, mEncryptionKeyIds, getSecretKeyId(),
Apg.getPassPhrase(), this);
Apg.getPassPhrase(), this,
PGPEncryptedData.AES_256, null);
} else {
Apg.signText(in, out, getSecretKeyId(),
Apg.getPassPhrase(), HashAlgorithmTags.SHA256, this);