wstrange / asn1lib

Dart ASN1 Encoder / Decoder
BSD 2-Clause "Simplified" License
30 stars 30 forks source link

Improve fromBytes. Logic from Java Bouncy Castle. #31

Closed Ephenodrom closed 4 years ago

Ephenodrom commented 4 years ago

The identifier is not initialized if the ObjectIdentifier is created by the fromBytes method. I updated the method and used the logic from the equivalent class in Java BouncyCastle at https://github.com/bcgit/bc-java/blob/738dfc0132323d66ad27e7ec366666ed3e0638ab/core/src/main/java/org/bouncycastle/asn1/ASN1ObjectIdentifier.java

I also added a new unit test.

Regards

wstrange commented 4 years ago

Awesome!! Thanks for the PR. I'll push a new version to pub later today

wstrange commented 4 years ago

version 0.5.9 pushed to pub