Documentation ¶
Index ¶
- Constants
- func Decrypt(c *Cipher, envelope []byte, lenTotal int) ([]byte, error)
- func Encrypt(c *Cipher, plain []byte) ([]byte, error)
- func KeyFromPassword(password string) []byte
- type Cipher
- func (c *Cipher) DecryptFrame(dst []byte, p []byte) ([]byte, error)
- func (c *Cipher) EncryptFrame(dst []byte, p []byte) []byte
- func (c *Cipher) EncryptedFrameSize(payloadLen int) int
- func (c *Cipher) FrameOverhead() int
- func (c *Cipher) GetDecryptedFrameBuf() []byte
- func (c *Cipher) GetEncryptedFrameBuf() []byte
- func (c *Cipher) NewReader(src io.Reader, lenTotal int) (*Reader, error)
- func (c *Cipher) NewWriteCloser(dst io.Writer, lenTotal int) (*WriteCloser, error)
- func (c *Cipher) PutDecryptedFrameBuf(p []byte)
- func (c *Cipher) PutEncryptedFrameBuf(p []byte)
- type Reader
- type WriteCloser
Constants ¶
View Source
const (
BtnFrameMaxPayload = 256 * 1024
)
Variables ¶
This section is empty.
Functions ¶
func KeyFromPassword ¶
Types ¶
type Cipher ¶
type Cipher struct {
// contains filtered or unexported fields
}
func (*Cipher) EncryptedFrameSize ¶
func (*Cipher) FrameOverhead ¶
func (*Cipher) GetDecryptedFrameBuf ¶
func (*Cipher) GetEncryptedFrameBuf ¶
func (*Cipher) NewWriteCloser ¶
func (*Cipher) PutDecryptedFrameBuf ¶
func (*Cipher) PutEncryptedFrameBuf ¶
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
func (*Reader) HasReadAll ¶
type WriteCloser ¶
type WriteCloser struct {
// contains filtered or unexported fields
}
func (*WriteCloser) Close ¶
func (bew *WriteCloser) Close() error
Click to show internal directories.
Click to hide internal directories.