def ec.jwk
bend-kit-jwt@0.11.0.1 · jwt.bend:492
import bend-kit-jwt@0.11.0.1/jwt.bend as Jwt
import Base
import bend-kit-crypto@0.2.2.2/crypto.bend as Crypto
import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes
492def ec.jwk(x: Bytes.Bytes, y: Bytes.Bytes, input: Bytes.Bytes, sig: Bytes.Bytes) -> IO(Result<&1, &1, Err, Bool>):
493 Bytes.Bytes{+xn, xb} = x
494 Bytes.Bytes{+yn, yb} = y
495 Bytes.Bytes{+dn, db} = input
496 Bytes.Bytes{+sn, sb} = sig
497 do IO<Result<&1, &1, Err, Bool>>:
498 r : Result<&1, &1, U32 & String, Bool> <- Crypto.ecdsa.verify.jwk.words("SHA256", xn, xb, yn, yb, dn, db, sn, sb)
499 return crypto.ok(r)