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, int, error)
- func SealVMessAEADHeader(key [16]byte, data []byte) []byte
- type AuthIDDecoder
- type AuthIDDecoderHolder
- type AuthIDDecoderItem
Constants ¶
View Source
const ( KDFSaltConstAuthIDEncryptionKey = "AES Auth ID Encryption" KDFSaltConstAEADRespHeaderLenKey = "AEAD Resp Header Len Key" KDFSaltConstAEADRespHeaderLenIV = "AEAD Resp Header Len IV" KDFSaltConstAEADRespHeaderPayloadKey = "AEAD Resp Header Key" KDFSaltConstAEADRespHeaderPayloadIV = "AEAD Resp Header IV" KDFSaltConstVMessAEADKDF = "VMess AEAD KDF" KDFSaltConstVMessHeaderPayloadAEADKey = "VMess Header AEAD Key" KDFSaltConstVMessHeaderPayloadAEADIV = "VMess Header AEAD Nonce" KDFSaltConstVMessHeaderPayloadLengthAEADKey = "VMess Header AEAD Key_Length" KDFSaltConstVMessHeaderPayloadLengthAEADIV = "VMess Header AEAD Nonce_Length" )
Variables ¶
View Source
var ( ErrNotFound = errors.New("user do not exist") 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.