2
2
mirror of https://github.com/octoleo/restic.git synced 2024-12-22 02:48:55 +00:00

Pass in a nil buffer to Open()

This commit is contained in:
Alexander Neumann 2017-11-01 09:58:59 +01:00
parent bb435b39d9
commit 6d46824fb0

View File

@ -88,8 +88,7 @@ func OpenKey(ctx context.Context, s *Repository, name string, password string) (
// decrypt master keys
nonce, ciphertext := k.Data[:k.user.NonceSize()], k.Data[k.user.NonceSize():]
buf := make([]byte, 0, len(ciphertext))
buf, err = k.user.Open(buf, nonce, ciphertext, nil)
buf, err := k.user.Open(nil, nonce, ciphertext, nil)
if err != nil {
return nil, err
}