Versions in this module Expand all Collapse all v0 v0.3.1 Feb 21, 2021 Changes in this version type ContentCrypter + PBlockPool bPool + func (cc *ContentCrypter) MergeBlock(oldData []byte, newData []byte, offset int) []byte v0.1.1 Jul 13, 2017 Changes in this version + const CurrentVersion + const HeaderLen + type ContentCrypter struct + CReqPool bPool + PReqPool bPool + func NewContentCrypter(core corecrypter.CoreCrypter, plainBS int) *ContentCrypter + func (cc *ContentCrypter) BlockNoToCipherOff(blockNo uint64) uint64 + func (cc *ContentCrypter) BlockNoToPlainOff(blockNo uint64) uint64 + func (cc *ContentCrypter) BlockOverhead() uint64 + func (cc *ContentCrypter) CipherBS() int + func (cc *ContentCrypter) CipherOffToBlockNo(cipherOffset uint64) uint64 + func (cc *ContentCrypter) CipherSizeToPlainSize(cipherSize uint64) uint64 + func (cc *ContentCrypter) DecryptBlocks(cipher []byte, firstBlockNo uint64, fileID []byte) ([]byte, error) + func (cc *ContentCrypter) EncryptBlocks(blocks [][]byte, firstBlockNo uint64, fileID []byte) ([]byte, error) + func (cc *ContentCrypter) ExplodePlainRange(offset uint64, length int) []IntraBlock + func (cc *ContentCrypter) PlainBS() int + func (cc *ContentCrypter) PlainOffToBlockNo(plainOffset uint64) uint64 + func (cc *ContentCrypter) PlainSizeToCipherSize(plainSize uint64) uint64 + func (cc *ContentCrypter) RewriteBlock(oldData []byte, newData []byte, offset int) []byte + func (cc *ContentCrypter) TransformPlainRange(offset uint64, length int) (plainSkip int, alignedOff uint64, alignedLen int) + type FileHeader struct + FileID []byte + Mode uint32 + Version uint16 + func NewFileHeader(mode uint32) *FileHeader + func ParseHeader(buf []byte) (*FileHeader, error) + func (h *FileHeader) Pack() []byte + type IntraBlock struct + BlockNo uint64 + Length int + Partial bool + Skip int