eap

package
v0.0.0-...-93e329f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 2, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CodeRequest  = 1
	CodeResponse = 2
	CodeSuccess  = 3
	CodeFailure  = 4
)
View Source
const (
	MSCHAPv2OpCodeChallenge = 1
	MSCHAPv2OpCodeResponse  = 2
	MSCHAPv2OpCodeSuccess   = 3
)
View Source
const (
	TypeIdentity         = 1
	TypeNotification     = 2
	TypeNak              = 3
	TypeMD5Challenge     = 4
	TypeOneTimePassword  = 5
	TypeGenericTokenCard = 6
	TypeMSCHAPv2         = 26
	TypeExpendedNak      = 254
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Identity

type Identity struct {
	Identity string
}

func (*Identity) UnmarshalBinary

func (d *Identity) UnmarshalBinary(b []byte) error

type MD5Challenge

type MD5Challenge struct {
	Value []byte
	Name  []byte
}

func (*MD5Challenge) MarshalBinary

func (d *MD5Challenge) MarshalBinary() ([]byte, error)

func (*MD5Challenge) UnmarshalBinary

func (d *MD5Challenge) UnmarshalBinary(b []byte) error

func (*MD5Challenge) Verify

func (d *MD5Challenge) Verify(identifier int, password, requestChallenge []byte) bool

type MSCHAPv2

type MSCHAPv2 struct {
	OpCode int
	Id     int
	Data   []byte
}

func NewMSCHAPv2

func NewMSCHAPv2(Id int, op interface{}) (*MSCHAPv2, error)

func (*MSCHAPv2) DecodeData

func (d *MSCHAPv2) DecodeData() (interface{}, error)

func (*MSCHAPv2) MarshalBinary

func (d *MSCHAPv2) MarshalBinary() ([]byte, error)

func (*MSCHAPv2) UnmarshalBinary

func (d *MSCHAPv2) UnmarshalBinary(b []byte) error

type MSCHAPv2Challenge

type MSCHAPv2Challenge struct {
	Challenge []byte
	Name      []byte
}

func NewMSCHAPv2Challenge

func NewMSCHAPv2Challenge(name string) (*MSCHAPv2Challenge, error)

func (*MSCHAPv2Challenge) MarshalBinary

func (d *MSCHAPv2Challenge) MarshalBinary() ([]byte, error)

type MSCHAPv2Response

type MSCHAPv2Response struct {
	PeerChallenge []byte
	NTResponse    []byte
	Name          []byte
}

func (*MSCHAPv2Response) GenerateAuthenticatorResponse

func (d *MSCHAPv2Response) GenerateAuthenticatorResponse(password string, authenticatorChallenge []byte) string

func (*MSCHAPv2Response) GenerateNTResponse

func (d *MSCHAPv2Response) GenerateNTResponse(password string, authenticatorChallenge []byte) []byte

func (*MSCHAPv2Response) UnmarshalBinary

func (d *MSCHAPv2Response) UnmarshalBinary(b []byte) error

func (*MSCHAPv2Response) Verify

func (d *MSCHAPv2Response) Verify(password string, authenticatorChallenge []byte) bool

type MSCHAPv2SuccessRequest

type MSCHAPv2SuccessRequest struct {
	AuthenticatorResponse string
}

func (*MSCHAPv2SuccessRequest) MarshalBinary

func (d *MSCHAPv2SuccessRequest) MarshalBinary() ([]byte, error)

type Nak

type Nak struct {
	DesiredAuthenticationTypes []int
}

func (*Nak) UnmarshalBinary

func (d *Nak) UnmarshalBinary(b []byte) error

type Packet

type Packet struct {
	Code       int
	Identifier int
	Data       []byte
}

func (*Packet) DecodeData

func (p *Packet) DecodeData() (interface{}, error)

func (*Packet) MarshalBinary

func (p *Packet) MarshalBinary() ([]byte, error)

func (*Packet) UnmarshalBinary

func (p *Packet) UnmarshalBinary(b []byte) error

type UnsupportedMSCHAPv2OpCodeError

type UnsupportedMSCHAPv2OpCodeError struct {
	OpCode int
}

func (UnsupportedMSCHAPv2OpCodeError) Error

type UnsupportedTypeError

type UnsupportedTypeError struct {
	Type int
}

func (UnsupportedTypeError) Error

func (e UnsupportedTypeError) Error() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL