Documentation ¶
Index ¶
- Constants
- type CryptState
- func (cs *CryptState) Decrypt(dst, src []byte) (err error)
- func (cs *CryptState) Encrypt(dst, src []byte)
- func (cs *CryptState) GenerateKey() (err error)
- func (cs *CryptState) OCBDecrypt(plain []byte, encrypted []byte, nonce []byte, tag []byte) (err error)
- func (cs *CryptState) OCBEncrypt(dst []byte, src []byte, nonce []byte, tag []byte) (err error)
- func (cs *CryptState) SetKey(key []byte, eiv []byte, div []byte) (err error)
Constants ¶
View Source
const DecryptHistorySize = 0x100
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CryptState ¶
type CryptState struct { RawKey [aes.BlockSize]byte EncryptIV [aes.BlockSize]byte DecryptIV [aes.BlockSize]byte LastGoodTime int64 Good uint32 Late uint32 Lost uint32 Resync uint32 RemoteGood uint32 RemoteLate uint32 RemoteLost uint32 RemoteResync uint32 // contains filtered or unexported fields }
func New ¶
func New() (cs *CryptState, err error)
func (*CryptState) Decrypt ¶
func (cs *CryptState) Decrypt(dst, src []byte) (err error)
func (*CryptState) Encrypt ¶
func (cs *CryptState) Encrypt(dst, src []byte)
func (*CryptState) GenerateKey ¶
func (cs *CryptState) GenerateKey() (err error)
func (*CryptState) OCBDecrypt ¶
func (*CryptState) OCBEncrypt ¶
Click to show internal directories.
Click to hide internal directories.