def ec.pem

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

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

484def ec.pem(p: Bytes.Bytes, input: Bytes.Bytes, sig: Bytes.Bytes) -> IO(Result<&1, &1, Err, Bool>):
485  Bytes.Bytes{+pn, pb} = p
486  Bytes.Bytes{+dn, db} = input
487  Bytes.Bytes{+sn, sb} = sig
488  do IO<Result<&1, &1, Err, Bool>>:
489    r : Result<&1, &1, U32 & String, Bool> <- Crypto.ecdsa.verify.words("SHA256", pn, pb, dn, db, sn, sb)
490    return crypto.ok(r)

Uses (12)

Used by (1)