Debian Codegraph @

pac/pac_info_buffer.go

raw symbols SCIP
1 package pac
2
3 import (
4 "encoding/binary"
5
6 "gopkg.in/jcmturner/rpc.v0/ndr"
7 )
8
9 const (
10 ulTypeKerbValidationInfo = 1
11 ulTypeCredentials = 2
12 ulTypePACServerSignatureData = 6
13 ulTypePACKDCSignatureData = 7
14 ulTypePACClientInfo = 10
15 ulTypeS4UDelegationInfo = 11
16 ulTypeUPNDNSInfo = 12
17 ulTypePACClientClaimsInfo = 13
18 ulTypePACDeviceInfo = 14
19 ulTypePACDeviceClaimsInfo = 15
20 )
21
22 // InfoBuffer implements the PAC Info Buffer: https://msdn.microsoft.com/en-us/library/cc237954.aspx
23 type InfoBuffer struct {
24 ULType uint32
25 CBBufferSize uint32
26 Offset uint64
27 }
28
29 // ReadPACInfoBuffer reads a InfoBuffer from the byte slice.
30 func ReadPACInfoBuffer(b *[]byte, p *int, e *binary.ByteOrder) InfoBuffer {
31 u := ndr.ReadUint32(b, p, e)
32 s := ndr.ReadUint32(b, p, e)
33 o := ndr.ReadUint64(b, p, e)
34 return InfoBuffer{
35 ULType: u,
36 CBBufferSize: s,
37 Offset: o,
38 }
39 }