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

@@ -61,7 +61,7 @@ func newTestRepo(content []TestFile) *TestRepo {
key := crypto.NewRandomKey()
seal := func(data []byte) []byte {
ciphertext := restic.NewBlobBuffer(len(data))
ciphertext := crypto.NewBlobBuffer(len(data))
ciphertext = ciphertext[:0] // truncate the slice
nonce := crypto.NewRandomNonce()
ciphertext = append(ciphertext, nonce...)