blob: 19e9f4961f4ec95c1cd3f01be5831546cc102713 [file] [log] [blame]
Scott Baker8461e152019-10-01 14:44:30 -07001package types
2
3import "github.com/jcmturner/gofork/encoding/asn1"
4
5// TypedData implements RFC 4120 type: https://tools.ietf.org/html/rfc4120#section-5.9.1
6type TypedData struct {
7 DataType int32 `asn1:"explicit,tag:0"`
8 DataValue []byte `asn1:"optional,explicit,tag:1"`
9}
10
11// TypedDataSequence implements RFC 4120 type: https://tools.ietf.org/html/rfc4120#section-5.9.1
12type TypedDataSequence []TypedData
13
14// Unmarshal bytes into the TypedDataSequence.
15func (a *TypedDataSequence) Unmarshal(b []byte) error {
16 _, err := asn1.Unmarshal(b, a)
17 return err
18}