How would I go about attempting to encrypt a file in elixir? I need to store some sensitive information in a text file such as a .dat but the information can only be decrypted if you have the passphrase to unlock the contents of the file. I’ve tried looking at :crypto but I don’t really understand it.
This answer seems to be what I’m looking for but I don’t know if it really does what I want it to. I would simply use
Base.decode64(:crypto.block_decrypt(:aes_ecb, key, input)) to decrypt the data?