diff options
author | Jakob Unterwurzacher | 2018-04-08 20:24:29 +0200 |
---|---|---|
committer | Jakob Unterwurzacher | 2018-04-08 20:26:25 +0200 |
commit | bcc8378a2c07476a43c1fe316b79590177ded3d3 (patch) | |
tree | 62ec5920109b92e3421884b9f3677ea95a83b56b /internal/stupidgcm | |
parent | cab0cda449c831d1d5bb9b75452428c186079799 (diff) |
Fix the easy golint warnings
Reported by https://goreportcard.com/report/github.com/rfjakob/gocryptfs
Diffstat (limited to 'internal/stupidgcm')
-rw-r--r-- | internal/stupidgcm/stupidgcm.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/internal/stupidgcm/stupidgcm.go b/internal/stupidgcm/stupidgcm.go index c8aecca..59636c0 100644 --- a/internal/stupidgcm/stupidgcm.go +++ b/internal/stupidgcm/stupidgcm.go @@ -23,7 +23,7 @@ const ( tagLen = 16 ) -// stupidGCM implements the cipher.AEAD interface +// StupidGCM implements the cipher.AEAD interface type StupidGCM struct { key []byte forceDecode bool @@ -42,10 +42,12 @@ func New(keyIn []byte, forceDecode bool) cipher.AEAD { return &StupidGCM{key: key, forceDecode: forceDecode} } +// NonceSize returns the required size of the nonce / IV. func (g *StupidGCM) NonceSize() int { return ivLen } +// Overhead returns the number of bytes that are added for authentication. func (g *StupidGCM) Overhead() int { return tagLen } |