def jwk.key.of

bend-kit-jwt@0.11.0.1 · jwt.bend:762

import bend-kit-jwt@0.11.0.1/jwt.bend as Jwt
import Base
import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes

762def jwk.key.of(rsa: Bool, a: Maybe<&1, Bytes.Bytes>, b: Maybe<&1, Bytes.Bytes>) -> Result<&1, &1, Err, Key>:
763  match rsa a b:
764    case True{} Some{n} Some{e}:
765      Done{Rsa{n, e}}
766    case False{} Some{x} Some{y}:
767      Done{Ec{x, y}}
768    case _ _ _:
769      Fail{Malformed{}}

Uses (6)

Used by (1)