Simple asn1 encoder/decoder