shieldEnsureKey method

  1. @override
Future<Map<String, Object?>?> shieldEnsureKey(
  1. String alias, {
  2. Uint8List? attestationChallenge,
})
override

Ensure the hardware-backed device key alias exists and return its public key: {x, y} (base64url P-256 coordinates), chain (Android attestation certificates, base64 DER, leaf first; empty on iOS), hardware (strongbox|tee|secure_enclave|software) and created. A newly created Android key is certified for attestationChallenge. Null where unsupported.

Implementation

@override
Future<Map<String, Object?>?> shieldEnsureKey(String alias, {Uint8List? attestationChallenge}) async {
  final r = await methodChannel.invokeMethod<Map<Object?, Object?>>('shieldEnsureKey', {
    'alias': alias,
    'attestationChallenge': ?attestationChallenge,
  });
  return r?.map((k, v) => MapEntry(k.toString(), v));
}