summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpennae <github@quasiparticle.net>2022-07-17 10:51:34 +0200
committerpennae <github@quasiparticle.net>2022-07-17 17:24:44 +0200
commitb0935f56b430223403629baa535d8b1f45ad9c6d (patch)
treeb0f85214a30c4264ddbe42da2a111fb14c1dd9f6
parentc1451924d88d146c7dc00c01d8c5f248978001b2 (diff)
downloadminor-skulk-b0935f56b430223403629baa535d8b1f45ad9c6d.tar.gz
minor-skulk-b0935f56b430223403629baa535d8b1f45ad9c6d.tar.xz
minor-skulk-b0935f56b430223403629baa535d8b1f45ad9c6d.zip
make crypto fields private if they're not used outside crypto
-rw-r--r--src/crypto.rs14
1 files 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<const N: usize> SecretBytes<N> {
#[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 {