v2ray-core: github.com/v2ray/v2ray-core/proxy/vmess/aead Index | Files

package aead

import "github.com/v2ray/v2ray-core/proxy/vmess/aead"

Index

Package Files

authid.go consts.go encrypt.go kdf.go

Constants

const KDFSaltConst_AEADRespHeaderLenIV = "AEAD Resp Header Len IV"
const KDFSaltConst_AEADRespHeaderLenKey = "AEAD Resp Header Len Key"
const KDFSaltConst_AEADRespHeaderPayloadIV = "AEAD Resp Header IV"
const KDFSaltConst_AEADRespHeaderPayloadKey = "AEAD Resp Header Key"
const KDFSaltConst_AuthIDEncryptionKey = "AES Auth ID Encryption"
const KDFSaltConst_VMessAEADKDF = "VMess AEAD KDF"
const KDFSaltConst_VMessHeaderPayloadAEADIV = "VMess Header AEAD Nonce"
const KDFSaltConst_VMessHeaderPayloadAEADKey = "VMess Header AEAD Key"
const KDFSaltConst_VMessHeaderPayloadLengthAEADIV = "VMess Header AEAD Nonce_Length"
const KDFSaltConst_VMessHeaderPayloadLengthAEADKey = "VMess Header AEAD Key_Length"

Variables

var ErrNotFound = errors.New("user do not exist")
var ErrReplay = errors.New("replayed request")

func CreateAuthID Uses

func CreateAuthID(cmdKey []byte, time int64) [16]byte

func KDF Uses

func KDF(key []byte, path ...string) []byte

func KDF16 Uses

func KDF16(key []byte, path ...string) []byte

func NewCipherFromKey Uses

func NewCipherFromKey(cmdKey []byte) cipher.Block

func OpenVMessAEADHeader Uses

func OpenVMessAEADHeader(key [16]byte, authid [16]byte, data io.Reader) ([]byte, bool, error, int)

func SealVMessAEADHeader Uses

func SealVMessAEADHeader(key [16]byte, data []byte) []byte

type AuthIDDecoder Uses

type AuthIDDecoder struct {
    // contains filtered or unexported fields
}

func NewAuthIDDecoder Uses

func NewAuthIDDecoder(cmdKey []byte) *AuthIDDecoder

func (*AuthIDDecoder) Decode Uses

func (aidd *AuthIDDecoder) Decode(data [16]byte) (int64, uint32, int32, []byte)

type AuthIDDecoderHolder Uses

type AuthIDDecoderHolder struct {
    // contains filtered or unexported fields
}

func NewAuthIDDecoderHolder Uses

func NewAuthIDDecoderHolder() *AuthIDDecoderHolder

func (*AuthIDDecoderHolder) AddUser Uses

func (a *AuthIDDecoderHolder) AddUser(key [16]byte, ticket interface{})

func (*AuthIDDecoderHolder) Match Uses

func (a *AuthIDDecoderHolder) Match(AuthID [16]byte) (interface{}, error)

func (*AuthIDDecoderHolder) RemoveUser Uses

func (a *AuthIDDecoderHolder) RemoveUser(key [16]byte)

type AuthIDDecoderItem Uses

type AuthIDDecoderItem struct {
    // contains filtered or unexported fields
}

func NewAuthIDDecoderItem Uses

func NewAuthIDDecoderItem(key [16]byte, ticket interface{}) *AuthIDDecoderItem

Package aead imports 15 packages (graph). Updated 2020-09-16. Refresh now. Tools for package owners.