MCPcopy
hub / github.com/rclone/rclone / DecryptDataSeek

Method DecryptDataSeek

backend/crypt/cipher.go:1112–1118  ·  view source on GitHub ↗

DecryptDataSeek decrypts the data stream from offset The open function must return a ReadCloser opened to the offset supplied. You must use this form of DecryptData if you might want to Seek the file handle

(ctx context.Context, open OpenRangeSeek, offset, limit int64)

Source from the content-addressed store, hash-verified

1110//
1111// You must use this form of DecryptData if you might want to Seek the file handle
1112func (c *Cipher) DecryptDataSeek(ctx context.Context, open OpenRangeSeek, offset, limit int64) (ReadSeekCloser, error) {
1113 out, err := c.newDecrypterSeek(ctx, open, offset, limit)
1114 if err != nil {
1115 return nil, err
1116 }
1117 return out, nil
1118}
1119
1120// EncryptedSize calculates the size of the data when encrypted
1121func (c *Cipher) EncryptedSize(size int64) int64 {

Callers 2

OpenMethod · 0.80

Calls 1

newDecrypterSeekMethod · 0.95

Tested by 1