| 1234567891011121314151617181920212223242526272829 |
- package mstypes
- import (
- "encoding/binary"
- "gopkg.in/jcmturner/gokrb5.v2/ndr"
- )
- // CypherBlock implements https://msdn.microsoft.com/en-us/library/cc237040.aspx
- type CypherBlock struct {
- Data []byte // size = 8
- }
- // UserSessionKey implements https://msdn.microsoft.com/en-us/library/cc237080.aspx
- type UserSessionKey struct {
- Data []CypherBlock // size = 2
- }
- // ReadUserSessionKey reads a UserSessionKey from the bytes slice.
- func ReadUserSessionKey(b *[]byte, p *int, e *binary.ByteOrder) UserSessionKey {
- cb1 := CypherBlock{
- Data: ndr.ReadBytes(b, p, 8, e),
- }
- cb2 := CypherBlock{
- Data: ndr.ReadBytes(b, p, 8, e),
- }
- return UserSessionKey{
- Data: []CypherBlock{cb1, cb2},
- }
- }
|