ninja_asn1 2.0.0 copy "ninja_asn1: ^2.0.0" to clipboard
ninja_asn1: ^2.0.0 copied to clipboard

Dart library that provides simple and elegant way to encode and decode ASN1

example/ninja_asn1_example.dart

import 'dart:convert';

import 'package:ninja_asn1/ninja_asn1.dart';

void main() {
  final integer = BigInt.parse(
      '20620915813302906913761247666337410938401372343750709187749515126790853245302593205328533062154315527282056175455193812046134139935830222032257750866653461677566720508752544506266533943725970345491747964654489405936145559121373664620352701801574863309087932865304205561439525871868738640172656811470047745445089832193075388387376667722031640892525639171016297098395245887609359882693921643396724693523583076582208970794545581164952427577506035951122669158313095779596666008591745562008787129160302313244329988240795948461701615228062848622019620094307696506764461083870202605984497833670577046553861732258592935325691');

  final original = ASN1Sequence(
      [ASN1Integer(integer), ASN1Null(), ASN1Boolean(true)]);
  final encoded = base64Encode(original.encode());
  print(encoded);
  final deocded = ASN1Object.decode(encoded);
  print(deocded);
}
2
likes
130
points
20.2k
downloads

Publisher

unverified uploader

Weekly Downloads

Dart library that provides simple and elegant way to encode and decode ASN1

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

collection

More

Packages that depend on ninja_asn1