summaryrefslogtreecommitdiff
path: root/cryptfs/cryptfs.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2015-10-04 14:36:20 +0200
committerJakob Unterwurzacher2015-10-04 14:49:47 +0200
commit89fef80d32708874c95742db0a7b593bcfd3b31d (patch)
treeadffeac51b1e945e32583b07ab0328a3c2539aad /cryptfs/cryptfs.go
parent5bd08abf4095fb553355c9b007c8ae4a4314b970 (diff)
Run go fmt
Diffstat (limited to 'cryptfs/cryptfs.go')
-rw-r--r--cryptfs/cryptfs.go24
1 files changed, 12 insertions, 12 deletions
diff --git a/cryptfs/cryptfs.go b/cryptfs/cryptfs.go
index 46f5b65..c58481c 100644
--- a/cryptfs/cryptfs.go
+++ b/cryptfs/cryptfs.go
@@ -3,23 +3,23 @@ package cryptfs
// CryptFS is the crypto backend of GoCryptFS
import (
- "fmt"
- "crypto/cipher"
"crypto/aes"
+ "crypto/cipher"
+ "fmt"
)
const (
- KEY_LEN = 16
- NONCE_LEN = 12
- AUTH_TAG_LEN = 16
+ KEY_LEN = 16
+ NONCE_LEN = 12
+ AUTH_TAG_LEN = 16
DEFAULT_PLAINBS = 4096
)
type CryptFS struct {
blockCipher cipher.Block
- gcm cipher.AEAD
- plainBS uint64
- cipherBS uint64
+ gcm cipher.AEAD
+ plainBS uint64
+ cipherBS uint64
// Stores an all-zero block of size cipherBS
allZeroBlock []byte
}
@@ -50,10 +50,10 @@ func NewCryptFS(key []byte, useOpenssl bool) *CryptFS {
cipherBS := DEFAULT_PLAINBS + NONCE_LEN + AUTH_TAG_LEN
return &CryptFS{
- blockCipher: b,
- gcm: gcm,
- plainBS: DEFAULT_PLAINBS,
- cipherBS: uint64(cipherBS),
+ blockCipher: b,
+ gcm: gcm,
+ plainBS: DEFAULT_PLAINBS,
+ cipherBS: uint64(cipherBS),
allZeroBlock: make([]byte, cipherBS),
}
}