Skip to content

Commit c6bacb2

Browse files
committed
more dead code removal
1 parent 669e503 commit c6bacb2

File tree

2 files changed

+1
-34
lines changed

2 files changed

+1
-34
lines changed

crates/sigstore-types/src/hash.rs

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -88,39 +88,6 @@ impl<'de> Deserialize<'de> for HashAlgorithm {
8888
}
8989
}
9090

91-
/// A hash output with its algorithm
92-
/// TODO: This is unused?
93-
#[derive(Debug, Clone, PartialEq, Eq)]
94-
pub struct HashOutput {
95-
/// The algorithm used to produce this hash
96-
pub algorithm: HashAlgorithm,
97-
/// The hash digest bytes
98-
pub digest: Vec<u8>,
99-
}
100-
101-
impl HashOutput {
102-
/// Create a new hash output
103-
pub fn new(algorithm: HashAlgorithm, digest: Vec<u8>) -> Self {
104-
Self { algorithm, digest }
105-
}
106-
107-
/// Get the digest as a hex string
108-
pub fn to_hex(&self) -> String {
109-
self.digest.iter().map(|b| format!("{:02x}", b)).collect()
110-
}
111-
}
112-
113-
/// Message imprint combining algorithm and digest (for TSA)
114-
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
115-
#[serde(rename_all = "camelCase")]
116-
pub struct MessageImprint {
117-
/// Hash algorithm used
118-
pub algorithm: HashAlgorithm,
119-
/// Hash digest (base64 encoded in JSON)
120-
#[serde(with = "crate::encoding::base64_bytes")]
121-
pub digest: Vec<u8>,
122-
}
123-
12491
// Re-export base64_bytes from encoding module for backwards compatibility
12592
pub use crate::encoding::base64_bytes;
12693

crates/sigstore-types/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@ pub use encoding::{
2424
SignatureBytes, SignedTimestamp, TimestampToken,
2525
};
2626
pub use error::{Error, Result};
27-
pub use hash::{HashAlgorithm, HashOutput, MessageImprint};
27+
pub use hash::HashAlgorithm;
2828
pub use intoto::{Digest, Statement, Subject};

0 commit comments

Comments
 (0)