changepasswddata.go 644 B

1234567891011121314151617181920212223
  1. package kadmin
  2. import (
  3. "github.com/jcmturner/gofork/encoding/asn1"
  4. "github.com/jcmturner/gokrb5/v8/types"
  5. )
  6. // ChangePasswdData is the payload to a password change message.
  7. type ChangePasswdData struct {
  8. NewPasswd []byte `asn1:"explicit,tag:0"`
  9. TargName types.PrincipalName `asn1:"explicit,optional,tag:1"`
  10. TargRealm string `asn1:"generalstring,optional,explicit,tag:2"`
  11. }
  12. // Marshal ChangePasswdData into a byte slice.
  13. func (c *ChangePasswdData) Marshal() ([]byte, error) {
  14. b, err := asn1.Marshal(*c)
  15. if err != nil {
  16. return []byte{}, err
  17. }
  18. //b = asn1tools.AddASNAppTag(b, asnAppTag.)
  19. return b, nil
  20. }