aboutsummaryrefslogtreecommitdiff
path: root/cryptfs/cryptfs.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2015-11-01 12:11:36 +0100
committerJakob Unterwurzacher2015-11-01 12:11:36 +0100
commit902babdf22199d73171716e643f1ffbb65e6fb48 (patch)
treec3194bce9fd9b4db0a569fca3b5041abd278be70 /cryptfs/cryptfs.go
parent14276c96328a1a1ad2b354c65d8db7fa720559e1 (diff)
Refactor ciphertext <-> plaintext offset translation functions
Move all the intelligence into the new file address_translation.go. That the calculations were spread out too much became apparent when adding the file header. This should make the code much easier to modify in the future.
Diffstat (limited to 'cryptfs/cryptfs.go')
-rw-r--r--cryptfs/cryptfs.go7
1 files changed, 1 insertions, 6 deletions
diff --git a/cryptfs/cryptfs.go b/cryptfs/cryptfs.go
index 0593214..9fe492d 100644
--- a/cryptfs/cryptfs.go
+++ b/cryptfs/cryptfs.go
@@ -13,7 +13,7 @@ const (
KEY_LEN = 32 // AES-256
NONCE_LEN = 12
AUTH_TAG_LEN = 16
- BLOCK_OVERHEAD = NONCE_LEN + AUTH_TAG_LEN
+ BLOCK_OVERHEAD = NONCE_LEN + AUTH_TAG_LEN
)
type CryptFS struct {
@@ -61,8 +61,3 @@ func NewCryptFS(key []byte, useOpenssl bool) *CryptFS {
func (be *CryptFS) PlainBS() uint64 {
return be.plainBS
}
-
-// Get ciphertext block size
-func (be *CryptFS) CipherBS() uint64 {
- return be.cipherBS
-}