of_the_cryptokeys static method

Future<SubtleCryptoECDSAP256Keys> of_the_cryptokeys({
  1. required CryptoKey public_key,
  2. required CryptoKey private_key,
})

Implementation

static Future<SubtleCryptoECDSAP256Keys> of_the_cryptokeys({required CryptoKey public_key, required CryptoKey private_key}) async {
    return SubtleCryptoECDSAP256Keys._(
        public_key_DER: (await promiseToFuture(callMethod(window.crypto!.subtle!, 'exportKey', ['spki', public_key]))).asUint8List(),
        public_key: public_key,
        private_key: private_key
    );
}