@cryptotaxi247 / kubo / commits / 881f5c988

secio unexpose bufPool

Juan Batiz-Benet committed Dec 12, 2014 at 03:30 UTC 881f5c9883e1a26549475b46dbdba4b1af2954f6
1 file changed +3 -3
crypto/secio/rw.go
+3 -3
@@ -17,9 +17,9 @@ import (
17 // ErrMACInvalid signals that a MAC verification failed
18 var ErrMACInvalid = errors.New("MAC verification failed")
19
20 -// BufPool is a ByteSlicePool for messages. we need buffers because (sadly)
20 +// bufPool is a ByteSlicePool for messages. we need buffers because (sadly)
21 // we cannot encrypt in place-- the user needs their buffer back.
22 -var BufPool = mpool.ByteSlicePool
22 +var bufPool = mpool.ByteSlicePool
23
24 type etmWriter struct {
25 // params
@@ -31,7 +31,7 @@ type etmWriter struct {
31
32 // NewETMWriter Encrypt-Then-MAC
33 func NewETMWriter(w io.Writer, s cipher.Stream, mac HMAC) msgio.WriteCloser {
34 - return &etmWriter{msg: msgio.NewWriter(w), str: s, mac: mac, pool: BufPool}
34 + return &etmWriter{msg: msgio.NewWriter(w), str: s, mac: mac, pool: bufPool}
35 }
36
37 // Write writes passed in buffer as a single message.