generateKey method

Future<File> generateKey({
  1. String password = '12345',
})

Implementation

Future<File> generateKey({String password = '12345'}) async {
  final arguments = [
    '-in "${certificateP12.path}"',
    '-nocerts',
    '-out "${keyPem.path}"',
    '-passin pass:',
    '-passout pass:$password',
  ];

  await run('openssl pkcs12 ${arguments.join(' ')}');
  return keyPem;
}