Documentation ¶
Index ¶
- Constants
- Variables
- func CreateAuthID(cmdKey []byte, time int64) [16]byte
- func KDF(key []byte, path ...string) []byte
- func KDF16(key []byte, path ...string) []byte
- func NewCipherFromKey(cmdKey []byte) cipher.Block
- func OpenVMessAEADHeader(key [16]byte, authid [16]byte, data io.Reader) ([]byte, bool, error, int)
- func SealVMessAEADHeader(key [16]byte, data []byte) []byte
- type AuthIDDecoder
- type AuthIDDecoderHolder
- type AuthIDDecoderItem
Constants ¶
View Source
const KDFSaltConst_AEADRespHeaderLenIV = "AEAD Resp Header Len IV"
View Source
const KDFSaltConst_AEADRespHeaderLenKey = "AEAD Resp Header Len Key"
View Source
const KDFSaltConst_AEADRespHeaderPayloadIV = "AEAD Resp Header IV"
View Source
const KDFSaltConst_AEADRespHeaderPayloadKey = "AEAD Resp Header Key"
View Source
const KDFSaltConst_AuthIDEncryptionKey = "AES Auth ID Encryption"
View Source
const KDFSaltConst_VMessAEADKDF = "VMess AEAD KDF"
View Source
const KDFSaltConst_VMessHeaderPayloadAEADIV = "VMess Header AEAD Nonce"
View Source
const KDFSaltConst_VMessHeaderPayloadAEADKey = "VMess Header AEAD Key"
View Source
const KDFSaltConst_VMessHeaderPayloadLengthAEADIV = "VMess Header AEAD Nonce_Length"
View Source
const KDFSaltConst_VMessHeaderPayloadLengthAEADKey = "VMess Header AEAD Key_Length"
Variables ¶
View Source
var ErrNotFound = errors.New("user do not exist")
View Source
var ErrReplay = errors.New("replayed request")
Functions ¶
func CreateAuthID ¶
func NewCipherFromKey ¶
func OpenVMessAEADHeader ¶
func SealVMessAEADHeader ¶
Types ¶
type AuthIDDecoder ¶
type AuthIDDecoder struct {
// contains filtered or unexported fields
}
func NewAuthIDDecoder ¶
func NewAuthIDDecoder(cmdKey []byte) *AuthIDDecoder
type AuthIDDecoderHolder ¶
type AuthIDDecoderHolder struct {
// contains filtered or unexported fields
}
func NewAuthIDDecoderHolder ¶
func NewAuthIDDecoderHolder() *AuthIDDecoderHolder
func (*AuthIDDecoderHolder) AddUser ¶
func (a *AuthIDDecoderHolder) AddUser(key [16]byte, ticket interface{})
func (*AuthIDDecoderHolder) Match ¶
func (a *AuthIDDecoderHolder) Match(AuthID [16]byte) (interface{}, error)
func (*AuthIDDecoderHolder) RemoveUser ¶
func (a *AuthIDDecoderHolder) RemoveUser(key [16]byte)
type AuthIDDecoderItem ¶
type AuthIDDecoderItem struct {
// contains filtered or unexported fields
}
func NewAuthIDDecoderItem ¶
func NewAuthIDDecoderItem(key [16]byte, ticket interface{}) *AuthIDDecoderItem
Click to show internal directories.
Click to hide internal directories.