Crates.io | ansible-vault |
lib.rs | ansible-vault |
version | 0.2.1 |
source | src |
created_at | 2019-01-18 14:05:24.292085 |
updated_at | 2022-10-28 14:34:19.977135 |
description | encrypt and decrypt ansible vault |
homepage | |
repository | https://github.com/tweedegolf/ansible-vault-rs |
max_upload_size | |
id | 109338 |
size | 20,402 |
[dependencies]
ansible-vault = "0.2.1"
Encrypt and decrypt Ansible Vault files
This library provides methods to encrypt and decrypt ansible vault data, in 1.1 format It exposes six methods:
$ANSIBLE_VAULT;1.1;AES256
nor indentation,encrypt_vault
)decrypt_vault
)Simple usage
use ansible_vault::{encrypt_vault, decrypt_vault};
let lipsum = "Lorem ipsum dolor…";
let encoded = encrypt_vault(lipsum.as_bytes(),"5Up€rs3creT").unwrap();
let decoded = decrypt_vault(encoded.as_bytes(), "5Up€rs3creT").unwrap();
let decoded_str = String::from_utf8(decoded).unwrap();
assert_eq!(lipsum, decoded_str);
License: MIT