c# - Eliminate Special Characters in GnuPG Encryption -


is there way eliminate special characters when encrypting gnupg. got below issue. when encrypt text gpg including special characters +.

encrypt command

--encrypt --armor --recipient 

so when encrypted text passed via query string , when try decrypt. getting below error.

error

gpg: no valid openpgp data found.gpg: decrypt_message failed: unknown system error  

so, there way configure gpg not include special characters?

no, there isn't. openpgp specifies 2 encodings, ascii armoring use , binary format.

ascii armoring has been developed mail transfer allows basic, 7-bit ascii characters without further encoding.

url encoding requires additional limitations or encoding. if cannot change data (and gnupg/openpgp can't), you'll have add encoding enforced transfer protocol chose.

luckily, c# has such url encoding , decoding methods built-in. i'd propose try url-encoding binary data if transmission size critical, might save significant portion of data. if transmit small encrypted messages, i'd stay url encoding ascii-armored message, handling ascii-armored string data more robust exchanging binary information.


Comments

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -