summaryrefslogtreecommitdiff
path: root/internal/contentenc
diff options
context:
space:
mode:
authorJakob Unterwurzacher2016-02-06 20:23:36 +0100
committerJakob Unterwurzacher2016-02-06 20:23:36 +0100
commitc74772bc8d7348ced429e5ca6ef47a53a8f215ff (patch)
tree5ac2097e050a09c02b4ed30b85f3f7774d03c9ad /internal/contentenc
parentb0ee5258b1ac60b9a672d9db0816b17ae12d0e55 (diff)
Run go fmt
Diffstat (limited to 'internal/contentenc')
-rw-r--r--internal/contentenc/content.go2
-rw-r--r--internal/contentenc/content_api.go11
-rw-r--r--internal/contentenc/file_header.go6
3 files changed, 9 insertions, 10 deletions
diff --git a/internal/contentenc/content.go b/internal/contentenc/content.go
index 14135a2..dd6aa26 100644
--- a/internal/contentenc/content.go
+++ b/internal/contentenc/content.go
@@ -3,8 +3,8 @@ package contentenc
// File content encryption / decryption
import (
- "encoding/binary"
"bytes"
+ "encoding/binary"
"encoding/hex"
"errors"
diff --git a/internal/contentenc/content_api.go b/internal/contentenc/content_api.go
index 4c6aa00..cf482b6 100644
--- a/internal/contentenc/content_api.go
+++ b/internal/contentenc/content_api.go
@@ -11,9 +11,9 @@ type ContentEnc struct {
// Cryptographic primitives
cryptoCore *cryptocore.CryptoCore
// Plaintext block size
- plainBS uint64
+ plainBS uint64
// Ciphertext block size
- cipherBS uint64
+ cipherBS uint64
// All-zero block of size cipherBS, for fast compares
allZeroBlock []byte
}
@@ -23,14 +23,13 @@ func New(cc *cryptocore.CryptoCore, plainBS uint64) *ContentEnc {
cipherBS := plainBS + uint64(cc.IVLen) + cryptocore.AuthTagLen
return &ContentEnc{
- cryptoCore: cc,
- plainBS: plainBS,
- cipherBS: cipherBS,
+ cryptoCore: cc,
+ plainBS: plainBS,
+ cipherBS: cipherBS,
allZeroBlock: make([]byte, cipherBS),
}
}
-
func (be *ContentEnc) PlainBS() uint64 {
return be.plainBS
}
diff --git a/internal/contentenc/file_header.go b/internal/contentenc/file_header.go
index 8a9dd2c..1463773 100644
--- a/internal/contentenc/file_header.go
+++ b/internal/contentenc/file_header.go
@@ -15,9 +15,9 @@ const (
// Current On-Disk-Format version
CurrentVersion = 2
- HEADER_VERSION_LEN = 2 // uint16
- HEADER_ID_LEN = 16 // 128 bit random file id
- HEADER_LEN = HEADER_VERSION_LEN + HEADER_ID_LEN // Total header length
+ HEADER_VERSION_LEN = 2 // uint16
+ HEADER_ID_LEN = 16 // 128 bit random file id
+ HEADER_LEN = HEADER_VERSION_LEN + HEADER_ID_LEN // Total header length
)
type FileHeader struct {