Documentation ¶
Index ¶
- Constants
- func AesMessageV6Decrypt(req AesMessageV6Request) (errMsg string)
- func AesMessageV6Encrypt(req AesMessageV6Request)
- func DecryptV3(key *[32]byte, data []byte) (output []byte, err error)
- func DecryptV3WithBase64(key *[32]byte, s string) (output []byte, err error)
- func EncryptV3(key *[32]byte, data []byte) (output []byte)
- func EncryptV3WithBase64(key *[32]byte, input []byte) (output string)
- func Get32PskFromSlice32(b []byte) *[32]byte
- func Get32PskFromString(s string) *[32]byte
- func GetAesBlockFrom32Psk(key *[32]byte) cipher.Block
- func MustSymmetryConn(conn io.ReadWriteCloser, key *[32]byte) (outConn io.ReadWriteCloser)
- func MustSymmetryConnEncryptOnceWithBlock(src []byte, block cipher.Block, bufW *udwBytes.BufWriter)
- func NewSymmetryConnWithBlock(conn io.ReadWriteCloser, block cipher.Block) io.ReadWriteCloser
- func PoolGetSymmetryConnWithBlock(conn io.ReadWriteCloser, block cipher.Block) io.ReadWriteCloser
- func PoolPutSymmetryConnAndClose(rwc io.ReadWriteCloser)
- func XorBytes(dst, a, b []byte) int
- func XorWords(dst, a, b []byte)
- type AesMessageV6KeyObject
- type AesMessageV6Request
- type EncryptV3Obj
Constants ¶
View Source
const ErrMsgDecryptKey = "decrypt key error magic buf not match"
Variables ¶
This section is empty.
Functions ¶
func AesMessageV6Decrypt ¶
func AesMessageV6Decrypt(req AesMessageV6Request) (errMsg string)
func AesMessageV6Encrypt ¶
func AesMessageV6Encrypt(req AesMessageV6Request)
func DecryptV3WithBase64 ¶
func EncryptV3WithBase64 ¶
func Get32PskFromSlice32 ¶
func Get32PskFromString ¶
func GetAesBlockFrom32Psk ¶
func MustSymmetryConn ¶
func MustSymmetryConn(conn io.ReadWriteCloser, key *[32]byte) (outConn io.ReadWriteCloser)
func NewSymmetryConnWithBlock ¶
func NewSymmetryConnWithBlock(conn io.ReadWriteCloser, block cipher.Block) io.ReadWriteCloser
func PoolGetSymmetryConnWithBlock ¶
func PoolGetSymmetryConnWithBlock(conn io.ReadWriteCloser, block cipher.Block) io.ReadWriteCloser
func PoolPutSymmetryConnAndClose ¶
func PoolPutSymmetryConnAndClose(rwc io.ReadWriteCloser)
Types ¶
type AesMessageV6KeyObject ¶
type AesMessageV6KeyObject struct {
// contains filtered or unexported fields
}
func NewAesMessageV6KeyObject ¶
func NewAesMessageV6KeyObject(key *[32]byte) AesMessageV6KeyObject
type AesMessageV6Request ¶
type AesMessageV6Request struct { KeyObject AesMessageV6KeyObject Data []byte OutputBufW *udwBytes.BufWriter }
type EncryptV3Obj ¶
type EncryptV3Obj struct {
// contains filtered or unexported fields
}
func NewUdwEncryterV3NoAlloc ¶
func NewUdwEncryterV3NoAlloc(key *[32]byte) *EncryptV3Obj
func NewUdwEncryterV3NoAllocV2 ¶
func NewUdwEncryterV3NoAllocV2(aesBlock cipher.Block) *EncryptV3Obj
func (*EncryptV3Obj) Clone ¶
func (obj *EncryptV3Obj) Clone() *EncryptV3Obj
func (*EncryptV3Obj) DecryptWithBuf ¶
func (obj *EncryptV3Obj) DecryptWithBuf(data []byte, buf []byte) (output []byte, err error)
func (*EncryptV3Obj) EncryptWithBuf ¶
func (obj *EncryptV3Obj) EncryptWithBuf(data []byte, buf []byte) []byte
func (*EncryptV3Obj) GetAesBlock ¶
func (obj *EncryptV3Obj) GetAesBlock() cipher.Block
Click to show internal directories.
Click to hide internal directories.