Encrypt data encrypts the data stream
(in io.Reader)
| 759 | |
| 760 | // Encrypt data encrypts the data stream |
| 761 | func (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 |
| 771 | func (c *Cipher) EncryptData(in io.Reader) (io.Reader, error) { |
no test coverage detected