crypto: move crypto buffer helpers

This commit is contained in:
Michael Eischer
2022-06-12 14:48:30 +02:00
parent a0cef9f247
commit 8c11fc3ec9
11 changed files with 29 additions and 26 deletions

View File

@@ -11,6 +11,7 @@ import (
"testing"
"time"
"github.com/restic/restic/internal/crypto"
"github.com/restic/restic/internal/debug"
"github.com/restic/restic/internal/fs"
"github.com/restic/restic/internal/restic"
@@ -225,7 +226,7 @@ func TestEnsureFileContent(ctx context.Context, t testing.TB, repo restic.Reposi
return
}
content := make([]byte, restic.CiphertextLength(len(file.Content)))
content := make([]byte, crypto.CiphertextLength(len(file.Content)))
pos := 0
for _, id := range node.Content {
part, err := repo.LoadBlob(ctx, restic.DataBlob, id, content[pos:])