MCPcopy Index your code
hub / github.com/rclone/rclone / encryptData

Method encryptData

backend/crypt/cipher.go:761–768  ·  view source on GitHub ↗

Encrypt data encrypts the data stream

(in io.Reader)

Source from the content-addressed store, hash-verified

759
760// Encrypt data encrypts the data stream
761func (c *Cipher) encryptData(in io.Reader) (io.Reader, *encrypter, error) {
762 in, wrap := accounting.UnWrap(in) // unwrap the accounting off the Reader
763 out, err := c.newEncrypter(in, nil)
764 if err != nil {
765 return nil, nil, err
766 }
767 return wrap(out), out, nil // and wrap the accounting back on
768}
769
770// EncryptData encrypts the data stream
771func (c *Cipher) EncryptData(in io.Reader) (io.Reader, error) {

Callers 3

EncryptDataMethod · 0.95
putMethod · 0.80
PutUncheckedMethod · 0.80

Calls 3

newEncrypterMethod · 0.95
UnWrapFunction · 0.92
wrapFunction · 0.85

Tested by

no test coverage detected