Skip to content
/ pem Public

Dart library that provides simple and elegant way to decode and encode PEM.

License

Notifications You must be signed in to change notification settings

ninja-dart/pem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ninja_pem

Dart library that provides simple and elegant way to decode and encode PEM.

Usage

A simple usage example:

import 'package:ninja_pem/ninja_pem.dart';

final pemString = '''-----BEGIN KEY1-----
TG9yZW0gaXBzdW0gZG9sb3Igc2l0IGFtZXQsIGNvbnNlY3RldHVyIGFkaXBpc2Np
bmcgZWxpdC4uLkxvcmVtIGlwc3VtIGRvbG9yIHNpdCBhbWV0LCBjb25zZWN0ZXR1
ciBhZGlwaXNjaW5nIGVsaXQuLi5Mb3JlbSBpcHN1bSBkb2xvciBzaXQgYW1ldCwg
Y29uc2VjdGV0dXIgYWRpcGlzY2luZyBlbGl0Li4uTG9yZW0gaXBzdW0gZG9sb3Ig
c2l0IGFtZXQsIGNvbnNlY3RldHVyIGFkaXBpc2NpbmcgZWxpdC4uLkxvcmVtIGlw
c3VtIGRvbG9yIHNpdCBhbWV0LCBjb25zZWN0ZXR1ciBhZGlwaXNjaW5nIGVsaXQu
Li4K
-----END KEY1-----''';

void main() {
  // Decode PEM
  final part = PemPart.decodeLabelled(pemString, ['KEY1']);
  // Encode PEM
  print(part.toString());
}

About

Dart library that provides simple and elegant way to decode and encode PEM.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages