Sample code for 30+ languages & platforms
Dart

Example: Crypt2.AddPfxSourceFile method

Demonstrates how to call the AddPfxSourceFile method.

Chilkat Dart Downloads

Dart
import 'package:chilkat/chilkat.dart';

void main() {
  final crypt = CkCrypt2();

  // Do public-key decryption (RSA)
  crypt.cryptAlgorithm = 'pki';

  // ...
  // ...
  // ...

  var pfxPath = 'c:/my_pfx_files/a.pfx';
  var pfxPassword = 'secret1';
  try {
    crypt.addPfxSourceFile(pfxPath, pfxPassword);
  } on ChilkatException catch (e) {
    print(e.lastErrorText);
    return;
  }

  // Add as many as PFX sources as desired...
  pfxPath = 'c:/my_pfx_files/b.pfx';
  pfxPassword = 'secret2';
  try {
    crypt.addPfxSourceFile(pfxPath, pfxPassword);
  } on ChilkatException catch (e) {
    print(e.lastErrorText);
    return;
  }

  // ...
  // ...
}