Documentation ¶
Index ¶
- Constants
- func DecodeObject(src io.Reader, block cipher.Block, iv []byte) ([]byte, error)
- func DecodeObjectAndTrim(src io.Reader, block cipher.Block, iv []byte) ([]byte, error)
- func EncodeObject(src io.Reader, block cipher.Block, iv []byte) ([]byte, int, error)
- func EncodePortableObject(src io.Reader, block cipher.Block, iv []byte) ([]byte, int, error)
- func GetNextMultiple(size int64, blockSize int64) int64
- func PadBuffer(buff []byte, blockSize int) ([]byte, int)
- func PkcsPadBuffer(buff []byte, blockSize int) ([]byte, int)
- func RoundToNextMultiple(size int64, blockSize int64) int64
- func Uid() string
- type EncryptedStore
- func (store EncryptedStore) GetUpload(ctx context.Context, id string) (handler.Upload, error)
- func (store EncryptedStore) NewUpload(ctx context.Context, info handler.FileInfo) (handler.Upload, error)
- func (store EncryptedStore) RangeReader(ctx context.Context, objectId string, multipartId string, start int64, ...) (io.ReadCloser, error)
- func (store EncryptedStore) UseIn(composer *handler.StoreComposer)
- type Semaphore
Constants ¶
const TEMP_DIR_USE_MEMORY = "_memory"
Variables ¶
This section is empty.
Functions ¶
func DecodeObject ¶
Decode the input data from a ReadCloser, using a given block cipher and an IV. Returns the decoded data
func DecodeObjectAndTrim ¶
Decode the input data from a Reader, using a given block cipher and an IV. The last decoded block is checked to derive the padding value Returns the decoded data
func EncodeObject ¶
Encode the input data from a ReadCloser, using a given block cipher and an IV. Returns the encoded data, and the number of padding bytes
func EncodePortableObject ¶
Encode the input data from a ReadCloser, using a given block cipher and an IV. Returns the encoded data, and the number of padding bytes
func GetNextMultiple ¶
func PadBuffer ¶
Apply padding to a buffer, given an input block size Returns the padded buffer and the number of bytes padded
func PkcsPadBuffer ¶
Apply padding to a buffer, given an input block size Returns the padded buffer and the number of bytes padded
func RoundToNextMultiple ¶
Types ¶
type EncryptedStore ¶
func (EncryptedStore) RangeReader ¶
func (store EncryptedStore) RangeReader(ctx context.Context, objectId string, multipartId string, start int64, length int64) (io.ReadCloser, error)
func (EncryptedStore) UseIn ¶
func (store EncryptedStore) UseIn(composer *handler.StoreComposer)
UseIn sets this store as the core data store in the passed composer and adds all possible extension to it.