mirror of
https://github.com/chatmail/core.git
synced 2026-04-29 03:16:29 +03:00
Add some initial tests for securejoin
This currently tests the setup-contact full flow and the shortcut flow. More securejoin tests are needed but this puts some infrastructure in place to start writing these.
This commit is contained in:
10
src/key.rs
10
src/key.rs
@@ -355,7 +355,7 @@ pub async fn store_self_keypair(
|
||||
}
|
||||
|
||||
/// A key fingerprint
|
||||
#[derive(Debug, Clone, Eq, PartialEq, Hash)]
|
||||
#[derive(Clone, Eq, PartialEq, Hash)]
|
||||
pub struct Fingerprint(Vec<u8>);
|
||||
|
||||
impl Fingerprint {
|
||||
@@ -375,6 +375,14 @@ impl Fingerprint {
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Debug for Fingerprint {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
f.debug_struct("Fingerprint")
|
||||
.field("hex", &self.hex())
|
||||
.finish()
|
||||
}
|
||||
}
|
||||
|
||||
/// Make a human-readable fingerprint.
|
||||
impl fmt::Display for Fingerprint {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
|
||||
Reference in New Issue
Block a user