func (attestedCredentialData *AttestedCredentialData) Marshal() ([]byte, error) {
	if attestedCredentialData == nil {
		return nil, fmt.Errorf("cannot marshal a nil attested credential")
	}

	var buf bytes.Buffer
	if err := write(&buf, attestedCredentialData.AAGUID[:]...); err != nil {
		return nil, err
	}
	if err := writeUint16(&buf, uint16(len(attestedCredentialData.CredentialID))); err != nil {
		return nil, err
	}
	if err := write(&buf, attestedCredentialData.CredentialID...); err != nil {
		return nil, err
	}
	if err := write(&buf, attestedCredentialData.CredentialPublicKey...); err != nil {
		return nil, err
	}
	return buf.Bytes(), nil
}
// Marshal marshals the attested credential data in the format described in Unmarshal.
Marshal marshals the attested credential data in the format described in Unmarshal.
// Marshal marshals the attested credential data in the format described in Unmarshal .
func (attestedCredentialData *AttestedCredentialData) Marshal() ([]byte, error) {
	if attestedCredentialData == nil {
		return nil, fmt.Errorf("cannot marshal a nil attested credential")
	}
	var buf bytes.Buffer
	if err := write(&buf, attestedCredentialData.AAGUID[:]...); err != nil {
		return nil, err
	}
	if err := writeUint16(&buf, uint16(len(attestedCredentialData.CredentialID))); err != nil {
		return nil, err
	}
	if err := write(&buf, attestedCredentialData.CredentialID...); err != nil {
		return nil, err
	}
	if err := write(&buf, attestedCredentialData.CredentialPublicKey...); err != nil {
		return nil, err
	}
	return buf.Bytes(), nil
}
func ( attestedCredentialData * AttestedCredentialData ) Marshal ( ) ( [ ] byte , error ) { if attestedCredentialData == nil { return nil , fmt . Errorf ( " " ) } var buf bytes . Buffer if err := write ( & buf , attestedCredentialData . AAGUID [ : ] ... ) ; err != nil { return nil , err } if err := writeUint16 ( & buf , uint16 ( len ( attestedCredentialData . CredentialID ) ) ) ; err != nil { return nil , err } if err := write ( & buf , attestedCredentialData . CredentialID ... ) ; err != nil { return nil , err } if err := write ( & buf , attestedCredentialData . CredentialPublicKey ... ) ; err != nil { return nil , err } return buf . Bytes ( ) , nil }
Marshal marshals the attested credential data in the format described in Unmarshal.
Marshal marshals the attested credential data in the format described in Unmarshal .