def ec.sign
bend-kit-jwt@0.11.0.1 · jwt.bend:528
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
528def ec.sign(p: Bytes.Bytes, input: Bytes.Bytes) -> IO(Result<&1, &1, Err, Bytes.Bytes>):
529 Bytes.Bytes{+pn, pb} = p
530 Bytes.Bytes{+dn, db} = input
531 do IO<Result<&1, &1, Err, Bytes.Bytes>>:
532 r : Result<&1, &1, U32 & String, U32 & Array<U32>> <- Crypto.ecdsa.sign.words("SHA256", pn, pb, dn, db)
533 return crypto.bytes(r)