Decrypt decrypts data using 256-bit AES-GCM. This both hides the content of
the data and provides a check that it hasn't been altered. Expects input
form nonce|ciphertext|tag where '|' indicates concatenation.
Encrypt encrypts data using 256-bit AES-GCM. This both hides the content of
the data and provides a check that it hasn't been altered. Output takes the
form nonce|ciphertext|tag where '|' indicates concatenation.
NewEncryptionKey generates a random 256-bit key for Encrypt() and
Decrypt().
If text is nil or empty, creates a random key. It panics if the source of randomness fails.
If text is not nil and not empty, and the length of text is lower than 32, the key is completed
with spaces.
If text is not nil and not empty, and the length of text us greater than 32, the 32 first bytes
are used as key.