Friday, August 11, 2023

How to Encrypt .txt & send it as data url

 how to encrypt a txt

on a mac using terminal to encrypt then in shortcuts app converting it to data url.

the file i made is on desktop called YOURFILE.txt


run this in the terminal:


openssl aes-256-cbc -salt -in YOURFILE.txt -out encrypted_YOURFILE.txt.enc


  • it asks for a password enter it
  • delete the original using the command


shred -u YOURFILE.txt


to decrypt the file:


openssl aes-256-cbc -d -in encrypted_YOURFILE.txt.enc -out decrypted_YOURFILE.txt


REMOVE AFTER: >>


shred -u decrypted_YOURFILE.txt


TO DECRYPT

—————————

openssl aes-256-cbc -d -in YOURFILE.txt.enc -out YOURFILE.txt



How to encode it as a data url using shortcut

————————————————

  • select files
  • encode file with base64
  • text box with this inside it:

data:application/octet-stream;base64,<urBase64filegoeshere>

  • copy to clipboard

No comments:

Post a Comment