prs_lib/crypto/backend/gnupg_bin/mod.rs
1//! Crypto backend using GnuPG for GPG.
2
3pub mod context;
4pub mod raw;
5mod raw_cmd;
6
7use std::path::PathBuf;
8
9/// GPG config.
10pub struct Config {
11 /// GPG binary.
12 bin: PathBuf,
13
14 /// Use TTY for GPG password input, rather than GUI pinentry.
15 pub gpg_tty: bool,
16
17 /// Whether to show verbose output.
18 pub verbose: bool,
19}
20
21impl Config {
22 /// Construct with given binary.
23 ///
24 /// - `config`: path to `gpg` binary
25 pub fn from(bin: PathBuf) -> Self {
26 Self {
27 bin,
28 gpg_tty: false,
29 verbose: false,
30 }
31 }
32}