Previously, the options inTee and usageRequiresAuth of generateKey() were only supported for ECDSA keys. This commit extends the support for those options to ECDH keys as well.
It also provides an example for deriving AES keys from ECDH keys and encrypting/decrypting data with them, using the new options.
Boyscouting: reduce code duplication in the crypto-sign.ts snippet.
Previously, the options
inTee
andusageRequiresAuth
ofgenerateKey()
were only supported for ECDSA keys. This commit extends the support for those options to ECDH keys as well.It also provides an example for deriving AES keys from ECDH keys and encrypting/decrypting data with them, using the new options.
Boyscouting: reduce code duplication in the
crypto-sign.ts
snippet.