importSpkiKey static method
Compatibility
TODO: explain that Chrome can't import SPKI keys from Firefox < 72. This is a bug in Chrome / BoringSSL (and package:webcrypto)
Chrome / BoringSSL doesn't recognize id-ecDH
, but only id-ecPublicKey
,
See: https://crbug.com/389400
Chrome / BoringSSL exports id-ecDH
, but Firefox exports
id-ecPublicKey
. Note that Firefox < 72 can import both SPKI keys
exported by both Chrome, BoringSSL and Firefox. While Chrome and BoringSSL
cannot import SPKI keys from Firefox < 72.
Firefox 72 and later exports SPKI keys with OID id-ecPublicKey
, thus,
this is not a problem.
Implementation
static Future<EcdhPublicKey> importSpkiKey(
List<int> keyData,
EllipticCurve curve,
) {
return impl.ecdhPublicKey_importSpkiKey(keyData, curve);
}