touch_grass/cryptography/sign
Produce a signature over a binary with a private key.
Modelled on the WebCrypto SubtleCrypto.sign(algorithm, key, data) API. The
request is a record { key, data } where key is a key in the shape
produced by a successful CreateKey effect (Eddsa({ kty, crv, x, d }))
and data is the binary to sign. The algorithm is taken from the key’s
variant tag.
Types
Values
pub fn decode(
lift: value.Value(a, b),
) -> Result(Request, break.Reason(a, b))
pub fn encode(
result: Result(BitArray, String),
) -> value.Value(m, c)
pub fn lift() -> isomorphic.Type(a)
pub fn lower() -> isomorphic.Type(a)