indutny / asn1.js

ASN.1 Decoder/Encoder/DSL
MIT License
181 stars 64 forks source link

Either default to 'der' encoding/decoding or throw a meaningful error #69

Closed felix closed 8 years ago

felix commented 8 years ago

Either option is trivial to implement but this would save a lot of time when an encoding is not explicitly specified. Since BER is not implemented and PEM is not as popular then DER would be a good default. But it is probably better to just throw an error. ATM it just complains about something else being 'undefined', not particularly helpful.

Give a preference and I will make a PR.

indutny commented 8 years ago

Let's do DER.