Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SNOW-1524257 Implement GCM encryption #1191
base: master
Are you sure you want to change the base?
SNOW-1524257 Implement GCM encryption #1191
Changes from all commits
8cdec9a
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Check warning on line 78 in encrypt_util.go
Codecov / codecov/patch
encrypt_util.go#L77-L78
Check warning on line 87 in encrypt_util.go
Codecov / codecov/patch
encrypt_util.go#L86-L87
Check warning on line 291 in encrypt_util.go
Codecov / codecov/patch
encrypt_util.go#L290-L291
Check warning on line 299 in encrypt_util.go
Codecov / codecov/patch
encrypt_util.go#L298-L299
Check warning on line 307 in encrypt_util.go
Codecov / codecov/patch
encrypt_util.go#L306-L307
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we add "#" here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be honest - I don't know, but we do the same in CBC encryption. The case is that such magic things might have solved some problems on some specific OSes or something in the past and I'm afraid to replace it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After trying to figure this out for some time I guess it's just a way to prevent collisions in filenames. The tempfile uses the same filename as the infile so I guess it's to prevent overriding the infile in case the tmpDir is empty or something
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I generally agree, but whether it has to be that way or not is another question. I think that in 99% we can replace it with
.bak
or anything, but I'd leave it as is.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will most likely not cause any problems, but in case some one, for god only know what reason, has files called my_file and my_file# it might cause a collision?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It feels like we should at least check if a file of this name exists
Check warning on line 319 in encrypt_util.go
Codecov / codecov/patch
encrypt_util.go#L318-L319
Check warning on line 324 in encrypt_util.go
Codecov / codecov/patch
encrypt_util.go#L323-L324
Check warning on line 329 in encrypt_util.go
Codecov / codecov/patch
encrypt_util.go#L328-L329
Check warning on line 334 in encrypt_util.go
Codecov / codecov/patch
encrypt_util.go#L333-L334
Check warning on line 341 in encrypt_util.go
Codecov / codecov/patch
encrypt_util.go#L340-L341
Check warning on line 347 in encrypt_util.go
Codecov / codecov/patch
encrypt_util.go#L346-L347
Check warning on line 351 in encrypt_util.go
Codecov / codecov/patch
encrypt_util.go#L350-L351
Check warning on line 362 in encrypt_util.go
Codecov / codecov/patch
encrypt_util.go#L361-L362
Check warning on line 383 in encrypt_util.go
Codecov / codecov/patch
encrypt_util.go#L382-L383
Check warning on line 387 in encrypt_util.go
Codecov / codecov/patch
encrypt_util.go#L386-L387
Check warning on line 391 in encrypt_util.go
Codecov / codecov/patch
encrypt_util.go#L390-L391
Check warning on line 395 in encrypt_util.go
Codecov / codecov/patch
encrypt_util.go#L394-L395
Check warning on line 399 in encrypt_util.go
Codecov / codecov/patch
encrypt_util.go#L398-L399
Check warning on line 403 in encrypt_util.go
Codecov / codecov/patch
encrypt_util.go#L402-L403
Check warning on line 408 in encrypt_util.go
Codecov / codecov/patch
encrypt_util.go#L407-L408
Check warning on line 413 in encrypt_util.go
Codecov / codecov/patch
encrypt_util.go#L412-L413
Check warning on line 417 in encrypt_util.go
Codecov / codecov/patch
encrypt_util.go#L416-L417
Check warning on line 422 in encrypt_util.go
Codecov / codecov/patch
encrypt_util.go#L421-L422
Check warning on line 426 in encrypt_util.go
Codecov / codecov/patch
encrypt_util.go#L425-L426