def rsa.jwk
bend-kit-jwt@0.11.0.1 · jwt.bend:475
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
475def rsa.jwk(n: Bytes.Bytes, e: Bytes.Bytes, input: Bytes.Bytes, sig: Bytes.Bytes) -> IO(Result<&1, &1, Err, Bool>):
476 Bytes.Bytes{+nn, nb} = n
477 Bytes.Bytes{+en, eb} = e
478 Bytes.Bytes{+dn, db} = input
479 Bytes.Bytes{+sn, sb} = sig
480 do IO<Result<&1, &1, Err, Bool>>:
481 r : Result<&1, &1, U32 & String, Bool> <- Crypto.rsa.verify.jwk.words("SHA256", nn, nb, en, eb, dn, db, sn, sb)
482 return crypto.ok(r)