Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Mateusz Dahlke <39696234+Xavrax@users.noreply.github.com>
  • Loading branch information
kleewho and Xavrax authored Sep 20, 2023
1 parent 77158c6 commit 0c7027a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion config.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ type Config struct {
StoreTokensOnGrant bool // Will store grant v3 tokens in token manager for further use.
FileMessagePublishRetryLimit int // The number of tries made in case of Publish File Message failure.
UseRandomInitializationVector bool // When true the IV will be random for all requests and not just file upload. When false the IV will be hardcoded for all requests except File Upload
CryptoModule crypto.CryptoModule //a cryptography module used for encryption and decryption
CryptoModule crypto.CryptoModule // A cryptography module used for encryption and decryption
}

// NewDemoConfig initiates the config with demo keys, for tests only.
Expand Down
2 changes: 1 addition & 1 deletion crypto/encrypting_reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func (encryptingReader *blockModeEncryptingReader) Read(p []byte) (n int, err er
return 0, errors.New("cannot read into empty buffer")
}

if (encryptingReader.err != nil) && encryptingReader.buffer.Len() == 0 {
if encryptingReader.err != nil && encryptingReader.buffer.Len() == 0 {
return 0, encryptingReader.err
}

Expand Down

0 comments on commit 0c7027a

Please sign in to comment.