update config_util.rs
This commit is contained in:
23
src/main.rs
23
src/main.rs
@@ -9,7 +9,8 @@ use std::{
|
||||
use rust_util::{
|
||||
XResult,
|
||||
};
|
||||
use pgp_util::OpenPGPTool;
|
||||
use config_util::*;
|
||||
// use pgp_util::OpenPGPTool;
|
||||
|
||||
// https://docs.sequoia-pgp.org/sequoia_openpgp/serialize/stream/struct.Encryptor.html
|
||||
// https://gitlab.com/sequoia-pgp/sequoia/blob/master/openpgp/examples/generate-encrypt-decrypt.rs
|
||||
@@ -18,9 +19,25 @@ fn main() -> XResult<()> {
|
||||
|
||||
println!("{}", SystemTime::now().duration_since(SystemTime::UNIX_EPOCH).unwrap().as_secs());
|
||||
|
||||
let openpgp_client = OpenPGPTool::from_file("sample.gpg")?;
|
||||
// let openpgp_client = OpenPGPTool::from_file("sample.gpg")?;
|
||||
|
||||
openpgp_client.encrypt_file("a", "b.gpg", false)?;
|
||||
// openpgp_client.encrypt_file("a", "b.gpg", false)?;
|
||||
|
||||
let config_json = get_config_json();
|
||||
|
||||
let j = config_json.unwrap();
|
||||
|
||||
println!("{}", j);
|
||||
|
||||
let c = parse_config(&j);
|
||||
|
||||
println!("{:?}", c);
|
||||
|
||||
println!("");
|
||||
|
||||
for i in c.items {
|
||||
println!("{:?}", i);
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user