mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-17 06:15:15 -05:00
Set literal data format tag to UTF8 when encrypting text
This commit is contained in:
parent
f8677a5f16
commit
b67b6b7f87
@ -434,7 +434,13 @@ public class PgpSignEncrypt {
|
|||||||
}
|
}
|
||||||
|
|
||||||
PGPLiteralDataGenerator literalGen = new PGPLiteralDataGenerator();
|
PGPLiteralDataGenerator literalGen = new PGPLiteralDataGenerator();
|
||||||
pOut = literalGen.open(bcpgOut, PGPLiteralData.BINARY, mOriginalFilename, new Date(),
|
char literalDataFormatTag;
|
||||||
|
if (mCleartextInput) {
|
||||||
|
literalDataFormatTag = PGPLiteralData.UTF8;
|
||||||
|
} else {
|
||||||
|
literalDataFormatTag = PGPLiteralData.BINARY;
|
||||||
|
}
|
||||||
|
pOut = literalGen.open(bcpgOut, literalDataFormatTag, mOriginalFilename, new Date(),
|
||||||
new byte[1 << 16]);
|
new byte[1 << 16]);
|
||||||
|
|
||||||
long alreadyWritten = 0;
|
long alreadyWritten = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user