0

i use gpg crypt but i want to crypt/decrypt files with pipe the content of the .gpg file or as input > filename

per default following syntax gpg --output doc --decrypt doc.gpg

the file doc.gpg must be exists ,decrypted file is doc after decrypt.

i want to decrypt only the doc.gpg content (with cat or pipe) without given a filename,but there are no options available.

next i want to crypt like so

gpg --crypt "this text is secure" --output doc.gpg

is there any option to crypt and decrypt without source input as file ?

myiPhone
  • 11
  • 4

1 Answers1

0

The base64 decode (or encode) process must be preceded.

decrypt example:

$ cat encrypted.txt | base64 --decode | gpg --decrypt
gpg: encrypted with 2048-bit RSA key, ID 9000000000000008, created 2019-03-07
      "username <me@example.com>"
Nxxxxxxxxxxxxxxxxxx9

Refer the encrypted.txt file below.

$ cat encrypted.txt
wcBMA5IbAAHihXV4AQgAZvd+HE0zz6iqWjWhutiQV2cYQ6XCu6kJSuqNfFlc6/BXtw6nMWQFkleJmi/0wB1OUXw6hBANxYvJUD0EiS/QJ0NO3NNYUzyCjlFZPkwHTyADovburLGoWCqQP0IILpbuLlgMeidSY8eAo7oE7i2AshAWv4T+xG2VlikJD1ClS9zHIaVm6V9OJKZYraTSJ9s/iB0JBY6HgePCD2gx1NLfwlECGrJfzMlRy9x2QaEF2iNQ/2SprXQxKfj4/+y2XSy8uRCp7mBl2Ty+G1xY9PVo3cL+spV60g08x0Q2lI8Z61Lp7YVUVLyRhETHsfp1LIJrFt40JAmrSPIsrDusGEXDktLgAeSuwIgltXlFtEJwguR6tscr4fFS4EHg2OGYEeB+4uOyksHg4+Re22WEVnEYsRN9teftJLEr4BniF9kQEeBF5B34gCszkBw4CLpjewiD71jiBszT+OEYWQA=
Alfred
  • 1,276
  • 11
  • 19