TypedData.go 309 B

123456789101112131415
  1. package types
  2. import "github.com/jcmturner/asn1"
  3. type TypedData struct {
  4. DataType int `asn1:"explicit,tag:0"`
  5. DataValue []byte `asn1:"optional,explicit,tag:1"`
  6. }
  7. type TypedDataSequence []TypedData
  8. func (a *TypedDataSequence) Unmarshal(b []byte) error {
  9. _, err := asn1.Unmarshal(b, a)
  10. return err
  11. }