Skip to content

Commit

Permalink
add header doc
Browse files Browse the repository at this point in the history
  • Loading branch information
junkurihara committed Apr 18, 2024
1 parent 1d4b82e commit b272b4e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
6 changes: 6 additions & 0 deletions httpsig-hyper/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
//! # httpsig-hyper
//!
//! `httpsig-hyper` is a crate that provides a convenient API for `Hyper` users to handle HTTP signatures.
//! This crate extends hyper's https request and response messages with the ability to generate and verify HTTP signatures.
//! Additionally it also provides a way to set and verify content-digest header.
mod error;
mod hyper_content_digest;
mod hyper_http;
Expand Down
7 changes: 7 additions & 0 deletions httpsig/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
//! # httpsig
//!
//! `httpsig` is a library for raw HTTP Signature.
//! It provides a simple API for signing and verifying HTTP messages, and does not depends on any HTTP framework.
//! It simply handles header keys and values in `String` or `&str` as HTTP message components, which means it can be used in any HTTP framework but requires complicated handling of HTTP headers.
//! We thus recommend to use [`httpsig-hyper`](https://crates.io/crates/httpsig-hyper) for `Hyper`` users, which provides a more convenient API.
mod crypto;
mod error;
mod message_component;
Expand Down
1 change: 1 addition & 0 deletions httpsig/src/signature_base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ impl HttpSignatureHeaders {
}

#[derive(Debug, Clone)]
/// Wrapper struct of raw signature bytes
pub struct HttpSignature(Vec<u8>);
impl std::fmt::Display for HttpSignature {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
Expand Down

0 comments on commit b272b4e

Please sign in to comment.