KeyCreationResult.fromChannel constructor

KeyCreationResult.fromChannel(
  1. Map<String, dynamic> raw
)

Implementation

factory KeyCreationResult.fromChannel(Map<String, dynamic> raw) {
  return KeyCreationResult(
    publicKey: FormattedValue(
      format:
          KeyFormatWire.fromWire(raw['publicKeyFormat'] as String?) ??
          KeyFormat.base64,
      value: raw['publicKey']!,
      pemLabel: raw['publicKeyPemLabel'] as String?,
    ),
    algorithm: (raw['algorithm'] as String?) ?? 'RSA',
    keySize: (raw['keySize'] as num?)?.toInt() ?? 2048,
  );
}