1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
pub mod client {
    use crate::crypto::{Encrypted, Secret};
    use serde::{Deserialize, Serialize};

    #[derive(Debug, Deserialize, Serialize)]
    /// pass user ID and encrypted secret
    pub struct Store {
        pub ciphertext: Encrypted<Secret>,
    }
}

pub mod server {
    use crate::crypto::KeyId;
    use serde::{Deserialize, Serialize};

    #[derive(Debug, Deserialize, Serialize)]
    /// return new requested key ID
    pub struct Generate {
        pub key_id: KeyId,
    }

    #[derive(Debug, Deserialize, Serialize)]
    /// Return true if successful
    pub struct Store {
        pub success: bool,
    }
}