Prefer instanceof CryptoKey where the global is available, so a plain object with algorithm/extractable/type properties can't be mistaken for a real key. Falls back to duck-typing only in environments without a global CryptoKey constructor.
instanceof CryptoKey
algorithm
extractable
type
CryptoKey
Prefer
instanceof CryptoKeywhere the global is available, so a plain object withalgorithm/extractable/typeproperties can't be mistaken for a real key. Falls back to duck-typing only in environments without a globalCryptoKeyconstructor.