From b0935f56b430223403629baa535d8b1f45ad9c6d Mon Sep 17 00:00:00 2001 From: pennae Date: Sun, 17 Jul 2022 10:51:34 +0200 Subject: make crypto fields private if they're not used outside crypto --- src/crypto.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/crypto.rs b/src/crypto.rs index c3417fd..617bd7a 100644 --- a/src/crypto.rs +++ b/src/crypto.rs @@ -129,11 +129,11 @@ impl SecretBytes { #[derive(Debug, Deserialize, Serialize)] #[serde(transparent)] pub struct AuthPW { - pub pw: SecretBytes<32>, + pw: SecretBytes<32>, } pub struct StretchedPW { - pub pw: Output, + pw: Output, } impl AuthPW { @@ -181,7 +181,7 @@ impl SessionCredentials { pub struct KeyFetchReq { pub token_id: TokenID, pub req_hmac_key: SecretBytes<32>, - pub key_request_key: SecretBytes<32>, + key_request_key: SecretBytes<32>, } impl KeyFetchReq { @@ -199,8 +199,8 @@ impl KeyFetchReq { } pub struct KeyFetchResp { - pub resp_hmac_key: SecretBytes<32>, - pub resp_xor_key: SecretBytes<64>, + resp_hmac_key: SecretBytes<32>, + resp_xor_key: SecretBytes<64>, } impl KeyFetchResp { @@ -230,8 +230,8 @@ impl KeyBundle { #[derive(Debug)] pub struct WrappedKeyBundle { - pub ciphertext: SecretBytes<64>, - pub hmac: [u8; 32], + ciphertext: SecretBytes<64>, + hmac: [u8; 32], } impl WrappedKeyBundle { -- cgit v1.2.3