hypersig/signature
Types
Values
pub fn from_request(req: request.Request(a)) -> Signature
pub fn new(key key: key.PrivateKey, id key_id: String) -> Config
Create a new signing config with a given private key and key ID By default the signed headers are (request-target), host, and date
pub fn new_with_headers(
key key: key.PrivateKey,
id key_id: String,
with headers: List(String),
) -> Config
Create a new signing config with a given private kye and key ID Uses the provided headers for singing rather than the default list
pub fn sign(
config cfg: Config,
request req: request.Request(a),
) -> Result(request.Request(a), error.HyperError)
pub fn verify(
signature sig: Signature,
with key: key.PublicKey,
) -> Result(Bool, error.HyperError)