Encrypt-String and Decrypt-String

AES256 encryption

Encrypt-String and Decrypt-String functions are in the last code block. Here are some examples first.

 

Encrypt a text file, line-by-line:  

 

Encrypt a text file as a single string:  

 

Encrypt and decrypt a string:

 

The actual functions: