package types

Import Path
	github.com/jcmturner/gokrb5/v8/types (on go.dev)

Dependency Relation
	imports 16 packages, and imported by 10 packages


Package-Level Type Names (total 25)
/* sort by: | */
ADAndOr implements RFC 4120 type: https://tools.ietf.org/html/rfc4120#section-5.2.6.3 ConditionCount int32 Elements AuthorizationData
ADIfRelevant implements RFC 4120 type: https://tools.ietf.org/html/rfc4120#section-5.2.6.1
ADKDCIssued implements RFC 4120 type: https://tools.ietf.org/html/rfc4120#section-5.2.6.2 ADChecksum Checksum Elements AuthorizationData IRealm string Isname PrincipalName Unmarshal bytes into the ADKDCIssued.
ADMandatoryForKDC implements RFC 4120 type: https://tools.ietf.org/html/rfc4120#section-5.2.6.4
Authenticator - A record containing information that can be shown to have been recently generated using the session key known only by the client and server. https://tools.ietf.org/html/rfc4120#section-5.5.1 AVNO int AuthorizationData AuthorizationData CName PrincipalName CRealm string CTime time.Time Cksum Checksum Cusec int SeqNumber int64 SubKey EncryptionKey GenerateSeqNumberAndSubKey sets the Authenticator's sequence number and subkey. Marshal the Authenticator. Unmarshal bytes into the Authenticator. func NewAuthenticator(realm string, cname PrincipalName) (Authenticator, error) func github.com/jcmturner/gokrb5/v8/messages.NewAPReq(tkt messages.Ticket, sessionKey EncryptionKey, auth Authenticator) (messages.APReq, error) func github.com/jcmturner/gokrb5/v8/service.(*Cache).AddEntry(sname PrincipalName, a Authenticator) func github.com/jcmturner/gokrb5/v8/service.(*Cache).IsReplay(sname PrincipalName, a Authenticator) bool
AuthorizationData implements RFC 4120 type: https://tools.ietf.org/html/rfc4120#section-5.2.6 Unmarshal bytes into the AuthorizationData.
AuthorizationDataEntry implements RFC 4120 type: https://tools.ietf.org/html/rfc4120#section-5.2.6 ADData []byte ADType int32 Unmarshal bytes into the AuthorizationDataEntry.
Checksum implements RFC 4120 type: https://tools.ietf.org/html/rfc4120#section-5.2.9 Checksum []byte CksumType int32 Unmarshal bytes into the Checksum.
EncryptedData implements RFC 4120 type: https://tools.ietf.org/html/rfc4120#section-5.2.9 Cipher []byte EType int32 KVNO int Marshal the EncryptedData. Unmarshal bytes into the EncryptedData. func github.com/jcmturner/gokrb5/v8/crypto.GetEncryptedData(plainBytes []byte, key EncryptionKey, usage uint32, kvno int) (EncryptedData, error) func github.com/jcmturner/gokrb5/v8/crypto.DecryptEncPart(ed EncryptedData, key EncryptionKey, usage uint32) ([]byte, error)
EncryptionKey implements RFC 4120 type: https://tools.ietf.org/html/rfc4120#section-5.2.9 AKA KeyBlock KeyType int32 KeyValue []byte Unmarshal bytes into the EncryptionKey. func GenerateEncryptionKey(etype etype.EType) (EncryptionKey, error) func github.com/jcmturner/gokrb5/v8/client.(*Client).GetCachedTicket(spn string) (messages.Ticket, EncryptionKey, bool) func github.com/jcmturner/gokrb5/v8/client.(*Client).GetServiceTicket(spn string) (messages.Ticket, EncryptionKey, error) func github.com/jcmturner/gokrb5/v8/client.(*Client).Key(etype etype.EType, kvno int, krberr *messages.KRBError) (EncryptionKey, int, error) func github.com/jcmturner/gokrb5/v8/crypto.GetKeyFromPassword(passwd string, cname PrincipalName, realm string, etypeID int32, pas PADataSequence) (EncryptionKey, etype.EType, error) func github.com/jcmturner/gokrb5/v8/kadmin.ChangePasswdMsg(cname PrincipalName, realm, password string, tkt messages.Ticket, sessionKey EncryptionKey) (r kadmin.Request, k EncryptionKey, err error) func github.com/jcmturner/gokrb5/v8/keytab.(*Keytab).GetEncryptionKey(princName PrincipalName, realm string, kvno int, etype int32) (EncryptionKey, int, error) func github.com/jcmturner/gokrb5/v8/messages.NewTicket(cname PrincipalName, crealm string, sname PrincipalName, srealm string, flags asn1.BitString, sktab *keytab.Keytab, eTypeID int32, kvno int, authTime, startTime, endTime, renewTill time.Time) (messages.Ticket, EncryptionKey, error) func github.com/jcmturner/gokrb5/v8/messages.(*ASRep).DecryptEncPart(c *credentials.Credentials) (EncryptionKey, error) func github.com/jcmturner/gokrb5/v8/client.(*Client).TGSExchange(tgsReq messages.TGSReq, kdcRealm string, tgt messages.Ticket, sessionKey EncryptionKey, referral int) (messages.TGSReq, messages.TGSRep, error) func github.com/jcmturner/gokrb5/v8/client.(*Client).TGSREQGenerateAndExchange(spn PrincipalName, kdcRealm string, tgt messages.Ticket, sessionKey EncryptionKey, renewal bool) (tgsReq messages.TGSReq, tgsRep messages.TGSRep, err error) func github.com/jcmturner/gokrb5/v8/crypto.DecryptEncPart(ed EncryptedData, key EncryptionKey, usage uint32) ([]byte, error) func github.com/jcmturner/gokrb5/v8/crypto.DecryptMessage(ciphertext []byte, key EncryptionKey, usage uint32) ([]byte, error) func github.com/jcmturner/gokrb5/v8/crypto.GetEncryptedData(plainBytes []byte, key EncryptionKey, usage uint32, kvno int) (EncryptedData, error) func github.com/jcmturner/gokrb5/v8/gssapi.NewInitiatorMICToken(payload []byte, key EncryptionKey) (*gssapi.MICToken, error) func github.com/jcmturner/gokrb5/v8/gssapi.NewInitiatorWrapToken(payload []byte, key EncryptionKey) (*gssapi.WrapToken, error) func github.com/jcmturner/gokrb5/v8/gssapi.(*MICToken).SetChecksum(key EncryptionKey, keyUsage uint32) error func github.com/jcmturner/gokrb5/v8/gssapi.(*MICToken).Verify(key EncryptionKey, keyUsage uint32) (bool, error) func github.com/jcmturner/gokrb5/v8/gssapi.(*WrapToken).SetCheckSum(key EncryptionKey, keyUsage uint32) error func github.com/jcmturner/gokrb5/v8/gssapi.(*WrapToken).Verify(key EncryptionKey, keyUsage uint32) (bool, error) func github.com/jcmturner/gokrb5/v8/kadmin.ChangePasswdMsg(cname PrincipalName, realm, password string, tkt messages.Ticket, sessionKey EncryptionKey) (r kadmin.Request, k EncryptionKey, err error) func github.com/jcmturner/gokrb5/v8/kadmin.(*Reply).Decrypt(key EncryptionKey) error func github.com/jcmturner/gokrb5/v8/messages.NewAPReq(tkt messages.Ticket, sessionKey EncryptionKey, auth Authenticator) (messages.APReq, error) func github.com/jcmturner/gokrb5/v8/messages.NewTGSReq(cname PrincipalName, kdcRealm string, c *config.Config, tgt messages.Ticket, sessionKey EncryptionKey, sname PrincipalName, renewal bool) (messages.TGSReq, error) func github.com/jcmturner/gokrb5/v8/messages.NewUser2UserTGSReq(cname PrincipalName, kdcRealm string, c *config.Config, clientTGT messages.Ticket, sessionKey EncryptionKey, sname PrincipalName, renewal bool, verifyingTGT messages.Ticket) (messages.TGSReq, error) func github.com/jcmturner/gokrb5/v8/messages.(*APReq).DecryptAuthenticator(sessionKey EncryptionKey) error func github.com/jcmturner/gokrb5/v8/messages.(*KRBCred).DecryptEncPart(key EncryptionKey) error func github.com/jcmturner/gokrb5/v8/messages.(*KRBPriv).DecryptEncPart(key EncryptionKey) error func github.com/jcmturner/gokrb5/v8/messages.(*KRBPriv).EncryptEncPart(key EncryptionKey) error func github.com/jcmturner/gokrb5/v8/messages.(*TGSRep).DecryptEncPart(key EncryptionKey) error func github.com/jcmturner/gokrb5/v8/messages.(*Ticket).Decrypt(key EncryptionKey) error func github.com/jcmturner/gokrb5/v8/pac.(*CredentialsInfo).DecryptEncPart(k EncryptionKey) error func github.com/jcmturner/gokrb5/v8/pac.(*CredentialsInfo).Unmarshal(b []byte, k EncryptionKey) (err error) func github.com/jcmturner/gokrb5/v8/pac.(*PACType).ProcessPACInfoBuffers(key EncryptionKey, l *log.Logger) error func github.com/jcmturner/gokrb5/v8/spnego.NewKRB5TokenAPREQ(cl *client.Client, tkt messages.Ticket, sessionKey EncryptionKey, GSSAPIFlags []int, APOptions []int) (spnego.KRB5Token, error) func github.com/jcmturner/gokrb5/v8/spnego.NewNegTokenInitKRB5(cl *client.Client, tkt messages.Ticket, sessionKey EncryptionKey) (spnego.NegTokenInit, error)
ETypeInfo implements RFC 4120 types: https://tools.ietf.org/html/rfc4120#section-5.2.7.4 Unmarshal bytes into the ETypeInfo func (*PAData).GetETypeInfo() (d ETypeInfo, err error)
ETypeInfo2 implements RFC 4120 types: https://tools.ietf.org/html/rfc4120#section-5.2.7.5 Unmarshal bytes into the ETypeInfo2 func (*PAData).GetETypeInfo2() (d ETypeInfo2, err error)
ETypeInfo2Entry implements RFC 4120 types: https://tools.ietf.org/html/rfc4120#section-5.2.7.5 EType int32 S2KParams []byte Salt string Unmarshal bytes into the ETypeInfo2Entry
ETypeInfoEntry implements RFC 4120 types: https://tools.ietf.org/html/rfc4120#section-5.2.7.4 EType int32 Salt []byte Unmarshal bytes into the ETypeInfoEntry
HostAddress implements RFC 4120 type: https://tools.ietf.org/html/rfc4120#section-5.2.5 AddrType int32 Address []byte Equal tests if the HostAddress is equal to another HostAddress provided. GetAddress returns a string representation of the HostAddress. func GetHostAddress(s string) (HostAddress, error) func HostAddressFromNetIP(ip net.IP) HostAddress func github.com/jcmturner/gokrb5/v8/service.(*Settings).ClientAddress() HostAddress func HostAddressesContains(h []HostAddress, a HostAddress) bool func HostAddressesContains(h []HostAddress, a HostAddress) bool func HostAddressesEqual(h, a []HostAddress) bool func (*HostAddress).Equal(a HostAddress) bool func (*HostAddresses).Contains(a HostAddress) bool func (*HostAddresses).Equal(a []HostAddress) bool func github.com/jcmturner/gokrb5/v8/messages.(*APReq).Verify(kt *keytab.Keytab, d time.Duration, cAddr HostAddress, snameOverride *PrincipalName) (bool, error) func github.com/jcmturner/gokrb5/v8/service.ClientAddress(h HostAddress) func(*service.Settings)
HostAddresses implements RFC 4120 type: https://tools.ietf.org/html/rfc4120#section-5.2.5 Contains tests if a HostAddress is contained within the HostAddresses struct. Equal tests if a HostAddress slice is equal to the HostAddresses struct. func HostAddressesFromNetIPs(ips []net.IP) (ha HostAddresses) func LocalHostAddresses() (ha HostAddresses, err error)
MethodData implements RFC 4120 types: https://tools.ietf.org/html/rfc4120#section-5.9.1
PAData implements RFC 4120 types: https://tools.ietf.org/html/rfc4120#section-5.2.7 PADataType int32 PADataValue []byte GetETypeInfo returns an ETypeInfo from the PAData. GetETypeInfo2 returns an ETypeInfo2 from the PAData. Unmarshal bytes into the PAData
PADataSequence implements RFC 4120 types: https://tools.ietf.org/html/rfc4120#section-5.2.7 Contains tests if a PADataSequence contains PA Data of a certain type. Unmarshal bytes into the PADataSequence *PADataSequence : golang.org/x/text/runes.Set func github.com/jcmturner/gokrb5/v8/crypto.GetKeyFromPassword(passwd string, cname PrincipalName, realm string, etypeID int32, pas PADataSequence) (EncryptionKey, etype.EType, error)
PAEncTimestamp implements RFC 4120 types: https://tools.ietf.org/html/rfc4120#section-5.2.7.2 Cipher []byte EType int32 KVNO int Unmarshal bytes into the PAEncTimestamp
PAEncTSEnc implements RFC 4120 types: https://tools.ietf.org/html/rfc4120#section-5.2.7.2 PATimestamp time.Time PAUSec int Unmarshal bytes into the PAEncTSEnc
PAReqEncPARep PA Data Type Chksum []byte ChksumType int32 Unmarshal bytes into the PAReqEncPARep
PrincipalName implements RFC 4120 type: https://tools.ietf.org/html/rfc4120#section-5.2.2 NameString []string NameType int32 Equal tests if the PrincipalName is equal to the one provided. GetSalt returns a salt derived from the PrincipalName. PrincipalNameString returns the PrincipalName in string form. func NewPrincipalName(ntype int32, spn string) PrincipalName func ParseSPNString(spn string) (pn PrincipalName, realm string) func github.com/jcmturner/gokrb5/v8/credentials.(*CCache).GetClientPrincipalName() PrincipalName func github.com/jcmturner/gokrb5/v8/credentials.(*Credentials).CName() PrincipalName func github.com/jcmturner/gokrb5/v8/service.(*Settings).KeytabPrincipal() *PrincipalName func NewAuthenticator(realm string, cname PrincipalName) (Authenticator, error) func PrincipalName.Equal(n PrincipalName) bool func github.com/jcmturner/gokrb5/v8/client.(*Client).TGSREQGenerateAndExchange(spn PrincipalName, kdcRealm string, tgt messages.Ticket, sessionKey EncryptionKey, renewal bool) (tgsReq messages.TGSReq, tgsRep messages.TGSRep, err error) func github.com/jcmturner/gokrb5/v8/credentials.NewFromPrincipalName(cname PrincipalName, realm string) *credentials.Credentials func github.com/jcmturner/gokrb5/v8/credentials.(*CCache).Contains(p PrincipalName) bool func github.com/jcmturner/gokrb5/v8/credentials.(*CCache).GetEntry(p PrincipalName) (*credentials.Credential, bool) func github.com/jcmturner/gokrb5/v8/credentials.(*Credentials).SetCName(pn PrincipalName) func github.com/jcmturner/gokrb5/v8/crypto.GetKeyFromPassword(passwd string, cname PrincipalName, realm string, etypeID int32, pas PADataSequence) (EncryptionKey, etype.EType, error) func github.com/jcmturner/gokrb5/v8/kadmin.ChangePasswdMsg(cname PrincipalName, realm, password string, tkt messages.Ticket, sessionKey EncryptionKey) (r kadmin.Request, k EncryptionKey, err error) func github.com/jcmturner/gokrb5/v8/keytab.(*Keytab).GetEncryptionKey(princName PrincipalName, realm string, kvno int, etype int32) (EncryptionKey, int, error) func github.com/jcmturner/gokrb5/v8/messages.NewASReq(realm string, c *config.Config, cname, sname PrincipalName) (messages.ASReq, error) func github.com/jcmturner/gokrb5/v8/messages.NewASReqForChgPasswd(realm string, c *config.Config, cname PrincipalName) (messages.ASReq, error) func github.com/jcmturner/gokrb5/v8/messages.NewASReqForTGT(realm string, c *config.Config, cname PrincipalName) (messages.ASReq, error) func github.com/jcmturner/gokrb5/v8/messages.NewKRBError(sname PrincipalName, realm string, code int32, etext string) messages.KRBError func github.com/jcmturner/gokrb5/v8/messages.NewTGSReq(cname PrincipalName, kdcRealm string, c *config.Config, tgt messages.Ticket, sessionKey EncryptionKey, sname PrincipalName, renewal bool) (messages.TGSReq, error) func github.com/jcmturner/gokrb5/v8/messages.NewTGSReq(cname PrincipalName, kdcRealm string, c *config.Config, tgt messages.Ticket, sessionKey EncryptionKey, sname PrincipalName, renewal bool) (messages.TGSReq, error) func github.com/jcmturner/gokrb5/v8/messages.NewTicket(cname PrincipalName, crealm string, sname PrincipalName, srealm string, flags asn1.BitString, sktab *keytab.Keytab, eTypeID int32, kvno int, authTime, startTime, endTime, renewTill time.Time) (messages.Ticket, EncryptionKey, error) func github.com/jcmturner/gokrb5/v8/messages.NewTicket(cname PrincipalName, crealm string, sname PrincipalName, srealm string, flags asn1.BitString, sktab *keytab.Keytab, eTypeID int32, kvno int, authTime, startTime, endTime, renewTill time.Time) (messages.Ticket, EncryptionKey, error) func github.com/jcmturner/gokrb5/v8/messages.NewUser2UserTGSReq(cname PrincipalName, kdcRealm string, c *config.Config, clientTGT messages.Ticket, sessionKey EncryptionKey, sname PrincipalName, renewal bool, verifyingTGT messages.Ticket) (messages.TGSReq, error) func github.com/jcmturner/gokrb5/v8/messages.NewUser2UserTGSReq(cname PrincipalName, kdcRealm string, c *config.Config, clientTGT messages.Ticket, sessionKey EncryptionKey, sname PrincipalName, renewal bool, verifyingTGT messages.Ticket) (messages.TGSReq, error) func github.com/jcmturner/gokrb5/v8/messages.(*APReq).Verify(kt *keytab.Keytab, d time.Duration, cAddr HostAddress, snameOverride *PrincipalName) (bool, error) func github.com/jcmturner/gokrb5/v8/messages.(*Ticket).DecryptEncPart(keytab *keytab.Keytab, sname *PrincipalName) error func github.com/jcmturner/gokrb5/v8/messages.(*Ticket).GetPACType(keytab *keytab.Keytab, sname *PrincipalName, l *log.Logger) (bool, pac.PACType, error) func github.com/jcmturner/gokrb5/v8/service.(*Cache).AddEntry(sname PrincipalName, a Authenticator) func github.com/jcmturner/gokrb5/v8/service.(*Cache).IsReplay(sname PrincipalName, a Authenticator) bool
TypedData implements RFC 4120 type: https://tools.ietf.org/html/rfc4120#section-5.9.1 DataType int32 DataValue []byte
TypedDataSequence implements RFC 4120 type: https://tools.ietf.org/html/rfc4120#section-5.9.1 Unmarshal bytes into the TypedDataSequence.
Package-Level Functions (total 17)
GenerateEncryptionKey creates a new EncryptionKey with a random key value.
GetHostAddress returns a HostAddress struct from a string in the format <hostname>:<port>
GetPAEncTSEncAsnMarshalled returns the bytes of a PAEncTSEnc.
HostAddressesContains tests if a HostAddress is contained in a HostAddress slice.
HostAddressesEqual tests if two HostAddress slices are equal.
HostAddressesFromNetIPs returns a HostAddresses type from a slice of net.IP
HostAddressFromNetIP returns a HostAddress type from a net.IP
IsFlagSet tests if a flag is set in the ASN1 BitString.
LocalHostAddresses returns a HostAddresses struct for the local machines interface IP addresses.
NewAuthenticator creates a new Authenticator.
NewKrbFlags returns an ASN1 BitString struct of the right size for KrbFlags.
NewPrincipalName creates a new PrincipalName from the name type int32 and name string provided.
ParseSPNString will parse a string in the format <service>/<name>@<realm> a PrincipalName type will be returned with the name type set to KRB_NT_PRINCIPAL(1) and the realm will be returned as a string. If the "@<realm>" suffix is not included in the SPN then the value of realm string returned will be ""
SetFlag sets a flag in an ASN1 BitString.
SetFlags sets the flags of an ASN1 BitString.
UnsetFlag unsets a flag in an ASN1 BitString.
UnsetFlags unsets flags in an ASN1 BitString.