parseKeyFromFileSync<T extends RSAAsymmetricKey> function

T parseKeyFromFileSync<T extends RSAAsymmetricKey>(
  1. String filename
)

Implementation

T parseKeyFromFileSync<T extends RSAAsymmetricKey>(String filename) {
  final file = File(filename);
  final key = file.readAsStringSync();
  final parser = RSAKeyParser();
  return parser.parse(key) as T;
}