encrypt_vault

Function encrypt_vault 

Source
pub fn encrypt_vault<T: Read>(input: T, key: &str) -> Result<String, VaultError>
Expand description

Encrypt a message to an ansible vault formated string

The output will be formatted with the ansible_vault header (1.1) an 80 chars lines and 6 spaces indentation.

$ANSIBLE_VAULT;1.1;AES256
33666638363066623664653234386231616339646438303933633830376132633330353032393364
3363373531316565663539326661393165323030383934380a366133633066623963303665303238
34633364626339313035633763313034366538363537306265316532663531363632383333353737
3863616362363731660a666161623033666331663937626433313432616266393830376431393665
3965

ยงArguments:

  • input: a stream to the data to encrypt
  • key: the key to encrypt the message