Skip to main content

decrypt_keyfile_data

Function decrypt_keyfile_data 

Source
pub fn decrypt_keyfile_data(
    keyfile_data: &[u8],
    password: Option<String>,
    password_env_var: Option<String>,
) -> Result<Vec<u8>, KeyFileError>
Expand description

Decrypts the passed keyfile data using ansible vault.

Arguments:
    keyfile_data (): The bytes to decrypt.
    password (str): The password used to decrypt the data. If `None`, asks for user input.
    coldkey_name (str): The name of the cold key. If provided, retrieves the password from environment variables.
Returns:
    decrypted_data (bytes): The decrypted data.