We encrypt a file for a client using BouncyCastle API. He gets a “For your eyes only” message from PGP when trying to decrypt it. Why?

こ雲淡風輕ζ 提交于 2019-12-05 10:09:43

I'm guessing that PgpLiteralDataGenerator.Console is what is causing it to show up only in the console of the client machine.

Stream literalOut = literalDataGenerator.Open(
    compressedOut, 
    PgpLiteralData.Binary,             
    PgpLiteralDataGenerator.Console,
    DateTime.Now, 
    new byte[BUFFER_SIZE]);

This message is shown when the encrypted file doesn't include a name of the original file. If you are not encrypting the file, you can put almost anything to that field (given that it constitutes a file name, valid for the target system).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!