hypersig/signature

Types

pub opaque type Config
pub opaque type Signature

Values

pub const algorithm: String
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)
pub fn with_extra(
  cfg: Config,
  key key: String,
  value value: String,
) -> Config
pub fn with_header(cfg: Config, header header: String) -> Config
Search Document