crypto: make crypto.sign() support poly1305 mac
Fixes: https://github.com/nodejs/node/issues/32433
@nodejs/crypto this needs input on design decisions.
-
What should the "create raw private key" API look like?
-
Is
crypto.sign()
the right place?
crypto.createSign()
doesn't feel right because you need to provide the key upfront rather than at sign.sign()
time.
You also can't just substitute EVP_DigestInit_ex()
with EVP_DigestSignInit()
.
crypto.createHmac()
doesn't feel right either because poly1305 is a MAC, not a HMAC.