General Upgrade, NEW: WebServers, Better Docs
Some checks failed
CI / checks (push) Has been cancelled
Some checks failed
CI / checks (push) Has been cancelled
This commit is contained in:
parent
5f11d476b6
commit
c9f2d78369
120 changed files with 10033 additions and 4887 deletions
|
|
@ -1,7 +1,7 @@
|
|||
[package]
|
||||
name = "keygen"
|
||||
version = "0.1.0"
|
||||
version = "0.2.0"
|
||||
edition = "2024"
|
||||
|
||||
[dependencies]
|
||||
mtp = { version = "0.1.0", path = "../../", features = ["files"] }
|
||||
mtp = { version = "0.2.0", path = "../../", features = ["files"] }
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ use std::path::PathBuf;
|
|||
|
||||
use mtp::crypto::Keyring;
|
||||
use mtp::files::{
|
||||
self, BUNDLE_EXTENSION, KEYRING_EXTENSION, load_keyring, load_public_key_bundle, save_keyring,
|
||||
save_public_key_bundle,
|
||||
self, BUNDLE_EXTENSION, KEYRING_EXTENSION, load_keyring_raw, load_public_key_bundle,
|
||||
save_keyring_raw, save_public_key_bundle,
|
||||
};
|
||||
|
||||
fn main() -> Result<(), files::FileError> {
|
||||
|
|
@ -11,11 +11,11 @@ fn main() -> Result<(), files::FileError> {
|
|||
let bundle_path = PathBuf::from(format!("bundle.{BUNDLE_EXTENSION}"));
|
||||
|
||||
let keyring = Keyring::generate();
|
||||
save_keyring(&keyring, &keyring_path)?;
|
||||
save_keyring_raw(&keyring, &keyring_path)?;
|
||||
save_public_key_bundle(&keyring.public_key_bundle(), &bundle_path)?;
|
||||
|
||||
/* Read both back to confirm the files round-trip through the on-disk format. */
|
||||
let loaded_keyring = load_keyring(&keyring_path)?;
|
||||
let loaded_keyring = load_keyring_raw(&keyring_path)?;
|
||||
let loaded_bundle = load_public_key_bundle(&bundle_path)?;
|
||||
assert_eq!(keyring.to_bytes(), loaded_keyring.to_bytes());
|
||||
assert_eq!(
|
||||
|
|
|
|||
Loading…
Reference in a new issue