parseKeyFromFile<T extends RSAAsymmetricKey> function

Future<T> parseKeyFromFile<T extends RSAAsymmetricKey>(
  1. String filename
)

Implementation

Future<T> parseKeyFromFile<T extends RSAAsymmetricKey>(String filename) async {
  final file = File(filename);
  final key = await file.readAsString();
  final parser = RSAKeyParser();
  return parser.parse(key) as T;
}