Skip to content

Commit

Permalink
Nicer tag seek
Browse files Browse the repository at this point in the history
  • Loading branch information
70sh1 committed Mar 3, 2024
1 parent 9e36f52 commit 02f374b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/encrypt.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func encryptFile(pathIn, pathOut, password string, bar *pb.ProgressBar) error {
}

tag := enc.blake.Sum(nil)
if _, err := tmpFile.Seek(int64(len(enc.nonce)+len(enc.scryptSalt)), 0); err != nil {
if _, err := tmpFile.Seek(int64(headerLen-len(tag)), 0); err != nil {
return err
}
if _, err := tmpFile.Write(tag); err != nil {
Expand Down

0 comments on commit 02f374b

Please sign in to comment.