18 lines
279 B
Go
18 lines
279 B
Go
package bloat
|
|
|
|
import (
|
|
"bytes"
|
|
"io"
|
|
|
|
"filippo.io/age"
|
|
)
|
|
|
|
func (b *Bloat[T]) decrypt(src []byte) ([]byte, error) {
|
|
input := bytes.NewReader(src)
|
|
out, err := age.Decrypt(input, &b.encPriv)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
res, err := io.ReadAll(out)
|
|
return res, err
|
|
}
|