MCPcopy Create free account
hub / github.com/FiloSottile/age / NewEncryptReader

Function NewEncryptReader

internal/stream/stream.go:270–276  ·  view source on GitHub ↗
(key []byte, src io.Reader)

Source from the content-addressed store, hash-verified

268}
269
270func NewEncryptReader(key []byte, src io.Reader) (*EncryptReader, error) {
271 aead, err := chacha20poly1305.New(key)
272 if err != nil {
273 return nil, err
274 }
275 return &EncryptReader{a: aead, src: src}, nil
276}
277
278func (r *EncryptReader) Read(p []byte) (int, error) {
279 if r.ready > 0 {

Callers 3

EncryptReaderFunction · 0.92
testVectorRoundTripFunction · 0.92
testRoundTripFunction · 0.92

Calls

no outgoing calls

Tested by 2

testVectorRoundTripFunction · 0.74
testRoundTripFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…