summaryrefslogtreecommitdiff
path: root/cryptfs/file_header.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/file_header.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/file_header.go')
-rw-r--r--cryptfs/file_header.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/cryptfs/file_header.go b/cryptfs/file_header.go
index 3fd7266..e16cbab 100644
--- a/cryptfs/file_header.go
+++ b/cryptfs/file_header.go
@@ -10,15 +10,15 @@ import (
)
const (
- HEADER_CURRENT_VERSION = 1 // Current on-disk-format version
- 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_CURRENT_VERSION = 1 // Current on-disk-format version
+ 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 {
Version uint16
- Id []byte
+ Id []byte
}
// Pack - serialize fileHeader object