aboutsummaryrefslogtreecommitdiff
path: root/cryptfs/address_translation.go
diff options
context:
space:
mode:
Diffstat (limited to 'cryptfs/address_translation.go')
-rw-r--r--cryptfs/address_translation.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/cryptfs/address_translation.go b/cryptfs/address_translation.go
index 147040c..b21cfc7 100644
--- a/cryptfs/address_translation.go
+++ b/cryptfs/address_translation.go
@@ -44,7 +44,7 @@ func (be *CryptFS) CipherSizeToPlainSize(cipherSize uint64) uint64 {
blockNo := be.CipherOffToBlockNo(cipherSize - 1)
blockCount := blockNo + 1
- overhead := BLOCK_OVERHEAD*blockCount + HEADER_LEN
+ overhead := be.BlockOverhead()*blockCount + HEADER_LEN
return cipherSize - overhead
}
@@ -56,7 +56,7 @@ func (be *CryptFS) PlainSizeToCipherSize(plainSize uint64) uint64 {
blockNo := be.PlainOffToBlockNo(plainSize - 1)
blockCount := blockNo + 1
- overhead := BLOCK_OVERHEAD*blockCount + HEADER_LEN
+ overhead := be.BlockOverhead()*blockCount + HEADER_LEN
return plainSize + overhead
}