def encrypt_var(source, keys):
    """Attempts to encrypt a variable"""
    cmd = flatten([gnupg_bin(), "--armor", "--encrypt", gnupg_verbose(),
                   recipients_args(keys)])
    output = stderr_with_input(cmd, source)
    return output
Attempts to encrypt a variable